Repository: aereal/dotfiles Branch: main Commit: ba0e4159c3ca Files: 139 Total size: 192.5 KB Directory structure: gitextract_iqt6khwm/ ├── .bundle/ │ └── config ├── .caprc ├── .colordiffrc ├── .config/ │ └── ghostty/ │ └── config ├── .dotfiles.ignore ├── .gemrc ├── .gitconfig ├── .gitignore ├── .gitmodules ├── .global.gitignore ├── .hammerspoon/ │ └── init.lua ├── .my.cnf ├── .peco/ │ └── config.json ├── .powenv ├── .proverc ├── .pryrc ├── .screenrc ├── .slate.d/ │ └── google_chrome.sh ├── .slate.js ├── .tigrc ├── .tmux.conf ├── .tmux.d/ │ └── scripts/ │ ├── macbook-battery │ └── today ├── .travis.yml ├── .uim ├── .vim/ │ ├── .eskk/ │ │ └── .keep │ ├── after/ │ │ ├── ftplugin/ │ │ │ ├── go.vim │ │ │ ├── haskell.vim │ │ │ ├── html.vim │ │ │ ├── javascript.vim │ │ │ ├── perl.vim │ │ │ ├── ruby.vim │ │ │ ├── scala.vim │ │ │ ├── sh.vim │ │ │ ├── tt2html.vim │ │ │ ├── typescript.vim │ │ │ └── vim.vim │ │ └── syntax/ │ │ └── sh.vim │ ├── bin/ │ │ └── prove-wrapper │ ├── colors/ │ │ ├── freya.vim │ │ ├── github.vim │ │ ├── liquidcarbon.vim │ │ ├── navajo-night.vim │ │ ├── railscasts.vim │ │ ├── shandy.vim │ │ ├── tiro_finale.vim │ │ ├── wombat256mod.vim │ │ ├── xoria256.vim │ │ └── zenesque.vim │ ├── etc/ │ │ ├── lazy.toml │ │ ├── operator.toml │ │ └── plugins.toml │ ├── filetype.vim │ ├── gvimrc │ ├── plugin/ │ │ └── memolist-templates/ │ │ └── hatena.txt │ ├── rc/ │ │ ├── 00_autocmd.vim │ │ ├── 00_base.vim │ │ ├── 10_dein.vim │ │ ├── 20_command.vim │ │ ├── 20_key.vim │ │ ├── 20_tab.vim │ │ ├── command_line_window.vim │ │ └── plugins/ │ │ ├── denite.added.vim │ │ ├── denite.sourced.vim │ │ ├── lightline.vim │ │ ├── neocomplete.vim │ │ ├── quickrun.vim │ │ ├── syntastic.added.vim │ │ ├── unite.added.vim │ │ └── watchdogs.vim │ ├── snippets/ │ │ ├── eruby.snip │ │ ├── io.snip │ │ ├── javascript.snippet │ │ ├── markdown.snippet │ │ ├── objc.snip │ │ ├── perl.snip │ │ ├── rspec.snip │ │ ├── ruby.snip │ │ ├── tap.snip │ │ ├── textile.snip │ │ ├── tt2.snip │ │ ├── tt2html.snip │ │ ├── vim.snip │ │ └── zsh.snip │ ├── tools/ │ │ └── efm_perl.pl │ └── vimrc ├── .vimperator/ │ └── colors/ │ └── solarized_light.vimp ├── .vimperatorrc ├── .vimperatorrc.js ├── .zsh.d/ │ └── functions/ │ ├── _carton │ ├── _padrino │ ├── _pkgutil │ ├── _prove │ ├── _proxychains4 │ ├── _rails │ ├── _tsocks │ ├── git_info │ ├── gyapbox │ ├── llenv_version_origin │ ├── prompt_aereal_setup │ ├── prompt_aereal_unicode_setup │ ├── prompt_lambda_setup │ └── prompt_yuno_setup ├── .zshenv ├── .zshrc ├── Brewfile ├── README.md ├── Rakefile ├── bin/ │ ├── abbrev-cwd.go │ ├── diff-highlight-wrapper │ ├── generate-typable-words │ ├── git-authors.go │ ├── git-catchup │ ├── git-check-dirty │ ├── git-git │ ├── git-issue-checkout │ ├── git-normalize-url │ ├── git-recent-branches │ ├── git-refresh-branch │ ├── git-run │ ├── git-topic-rebase │ ├── git-up │ ├── macvim │ ├── man │ ├── metacpan │ ├── mkproj │ ├── os-version │ ├── paginate │ ├── pm-version │ ├── screenshot2slack │ └── ts-project ├── colors/ │ └── Japanesque/ │ ├── Japanesque.itermcolors │ └── README.markdown ├── osx/ │ ├── defaults/ │ │ ├── alfred.bash │ │ └── config.bash │ └── keyremap4macbook/ │ ├── config.sh │ └── private.xml └── test/ ├── Gemfile └── dotfiles_test.rb ================================================ FILE CONTENTS ================================================ ================================================ FILE: .bundle/config ================================================ --- BUNDLE_BIN: ".bundle/bin" BUNDLE_JOBS: '4' ================================================ FILE: .caprc ================================================ # vim:set ft=ruby: begin require 'capistrano_colors' rescue LoadError end ================================================ FILE: .colordiffrc ================================================ # Example colordiffrc file for dark backgrounds # # Set banner=no to suppress authorship info at top of # colordiff output banner=no # By default, when colordiff output is being redirected # to a file, it detects this and does not colour-highlight # To make the patch file *include* colours, change the option # below to 'yes' color_patches=no # Sometimes it can be useful to specify which diff command to # use: that can be specified here diff_cmd=diff # # available colours are: white, yellow, green, blue, # cyan, red, magenta, black, # darkwhite, darkyellow, darkgreen, # darkblue, darkcyan, darkred, # darkmagenta, darkblack # # Can also specify 'none', 'normal' or 'off' which are all # aliases for the same thing, namely "don't colour highlight # this, use the default output colour" # plain=off newtext=darkgreen oldtext=red diffstuff=magenta cvsstuff=green ================================================ FILE: .config/ghostty/config ================================================ font-family = "Cascadia Code" font-family = "HackGen Console" font-size = 18 theme = "/Applications/Ghostty.app/Contents/Resources/ghostty/themes/One Half Light" cursor-style-blink = true copy-on-select = false macos-titlebar-style = transparent macos-option-as-alt = true ================================================ FILE: .dotfiles.ignore ================================================ .git .gitmodules .travis.yml .dotfiles.ignore ================================================ FILE: .gemrc ================================================ --- :backtrace: true :benchmark: false :verbose: true gem: -N search: -r ================================================ FILE: .gitconfig ================================================ [user] email = trasty.loose@gmail.com name = aereal [gui] encoding = utf-8 [github] user = aereal [alias] abort-rebase = rebase --abort branch-name = name-rev --name-only ci = commit -v co = checkout continue-rebase = rebase --continue cp = cherry-pick df = diff ds = diff --staged fdf = diff --function-context fetch-pulls = fetch origin +refs/pull/*:refs/remotes/pull/* fix = commit --amend gr = grep interactive-rebase = rebase --interactive network = log --graph --all --decorate --oneline onelog = log --oneline squashed-merge = merge --squash st = status --branch --short --untracked-files=normal --ignore-submodules=dirty ls = ls-files delete-branch = branch -d current-branch = symbolic-ref --short HEAD curret-remote-branch = rev-parse --abbrev-ref --symbolic-full-name @{u} hard-revert-merge-commit = reset --hard ORIG_HEAD medetai = !git rev-list HEAD | rg -P '(.)\\1\\1' medetai4 = !git rev-list HEAD | rg -P '(.)\\1\\1\\1' medetai5 = !git rev-list HEAD | rg -P '(.)\\1\\1\\1\\1' medetai6 = !git rev-list HEAD | rg -P '(.)\\1\\1\\1\\1\\1' medetai7 = !git rev-list HEAD | rg -P '(.)\\1\\1\\1\\1\\1\\1' pr = pull-request recently-added = log --grep \"Revert\" --invert-grep --diff-filter=A --format=\"\" --name-only [color] branch = true diff = true grep = true interactive = true pager = true status = true [color "branch"] current = green reverse local = green remote = yellow [color "status"] changed = green untracked = cyan updated = yellow [i18n] commitencoding= utf-8 [core] quotepath = false whitespace = cr-at-eol pager = $PAGER precomposeunicode = true excludesfile = ~/.global.gitignore [push] default = simple autoSetupRemote = true [branch] autosetuprebase = always [grep] lineNumber = true patternType = perl [rebase] stat = true [diff "gzip"] textconv = gzcat [log] date = iso [merge] stat = true [interactive] singlekey = true [ghq] root = /Users/aereal/devel/src [diff] algorithm = histogram [include] path = ~/.secret.gitconfig [advice] statusHints = false [pager] log = git-diff-highlight | less show = git-diff-highlight | less diff = git-diff-highlight | less grep = false [url "git@github.com:"] pushInsteadOf = https://github.com/ pushInsteadOf = git://github.com/ [pull] rebase = true [init] defaultBranch = main ================================================ FILE: .gitignore ================================================ .vim/cookies/ .vim/netrwhist .vim/.netrwhist .vim/swp/* .vim/.neocon/* .vim/.ref/* .vim/.unite/* .vim/undo/* .vim/bundle/* src .zcompcache/ .zcompdump /.vimperator/info/default/ /.vim/snippets/*/private/ .vim/.eskk/log .vim/cache ================================================ FILE: .gitmodules ================================================ [submodule "colors/dircolors-solarized"] path = colors/dircolors-solarized url = git://github.com/seebi/dircolors-solarized.git ================================================ FILE: .global.gitignore ================================================ MYMETA.json MYMETA.yml /vendor/bundle /.bundle/ .DS_Store tags .envrc .local.vimrc ================================================ FILE: .hammerspoon/init.lua ================================================ hs.window.animationDuration = 0 viKey = hs.hotkey.modal.new('ctrl-cmd-option', 'space', 'hammerspoon') function viKey:entered() hs.alert'Enter' end function viKey:exited() hs.alert'Exit' end viKey:bind('', 'escape', function() viKey:exit() end) units = { enter = { x = 0.0, y = 0.0, w = 1.0, h = 1.0 }, spc = { x = 0.125, y = 0.125, w = 0.75, h = 0.75 }, h = { x = 0.0, y = 0.0, w = 0.5, h = 1.0 }, l = { x = 0.5, y = 0.0, w = 0.5, h = 1.0 }, j = { x = 0.0, y = 0.5, w = 1.0, h = 0.5 }, k = { x = 0.0, y = 0.0, w = 1.0, h = 0.5 }, i = { x = 0.0, y = 0.0, w = 0.5, h = 0.5 }, o = { x = 0.5, y = 0.0, w = 0.5, h = 0.5 }, n = { x = 0.0, y = 0.5, w = 0.5, h = 0.5 }, m = { x = 0.5, y = 0.5, w = 0.5, h = 0.5 }, } viKey:bind('', 'return', function() hs.window.focusedWindow():move(units.enter) end) viKey:bind('', 'space', function() hs.window.focusedWindow():move(units.spc) end) viKey:bind('', 'h', function() hs.window.focusedWindow():move(units.h) end) viKey:bind('', 'l', function() hs.window.focusedWindow():move(units.l) end) viKey:bind('', 'j', function() hs.window.focusedWindow():move(units.j) end) viKey:bind('', 'k', function() hs.window.focusedWindow():move(units.k) end) viKey:bind('', 'i', function() hs.window.focusedWindow():move(units.i) end) viKey:bind('', 'o', function() hs.window.focusedWindow():move(units.o) end) viKey:bind('', 'n', function() hs.window.focusedWindow():move(units.n) end) viKey:bind('', 'm', function() hs.window.focusedWindow():move(units.m) end) ================================================ FILE: .my.cnf ================================================ [mysql] prompt="\u@\h[\d]> " auto-rehash ================================================ FILE: .peco/config.json ================================================ { "Prompt": ">", "Keymap": { "M-x": "peco.ToggleSelectionAndSelectNext", "C-g": "peco.Cancel" }, "Style": { "SavedSelection": [ "bold" ], "Selected": [ "underline" ], "Query": [ "yellow" ], "Matched": [ "cyan", "reverse" ] } } ================================================ FILE: .powenv ================================================ # vim:set ft=sh: export PATH=$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH ================================================ FILE: .proverc ================================================ --color --lib --failure --recurse --timer --trap ================================================ FILE: .pryrc ================================================ # vim:set ft=ruby: def pbcopy(str) IO.popen('pbcopy', 'r+') {|io| io.puts str } end Pry.config.commands.command 'hcopy', 'Copy a history to clipboard' do |n| pbcopy _pry_.input_array[n ? n.to_i : -1] end Pry.config.commands.command 'copy', 'Copy a text to clipboard' do |str| pbcopy str end Pry.config.commands.command 'lastcopy', 'Copy the last result to clipboard' do pbcopy _pry_.last_result.chomp end if defined?(Hirb) Hirb::View.instance_eval do def enable_output_method @output_method = true @original_print = Pry.config.print Pry.config.print = -> (output, value) { Hirb::View.view_or_page_output(value) || @original_print.call(output, value) } end def disable_output_method Pry.config.print = @original_print @output_method = nil end end Hirb.enable end ================================================ FILE: .screenrc ================================================ escape ^tt defscrollback 10000 defutf8 on defkanji utf-8 encoding utf-8 utf-8 defencoding utf-8 startup_message off autodetach on logfile "/tmp/screen-log-%Y%m%d-%n.log" log on deflog on altscreen on defbce on termcapinfo xterm-256color|xterm-color|screen-256color ti@:te@ term screen-256color vbell off bell_msg "Bell in window %^G" bind j focus down bind k focus up bind w eval 'echo "Operate window"' 'command -c operate' bind -c operate ^] command bind -c operate j eval 'focus down' 'command -c operate' bind -c operate k eval 'focus up' 'command -c operate' bind -c operate \^ eval 'focus top' 'command -c operate' bind -c operate $ eval 'focus bottom' 'command -c operate' bind -c operate x eval 'remove' 'command -c operate' bind -c operate s eval 'split' 'command -c operate' bind -c operate v eval 'split -v' 'command -c operate' bind -c operate + eval 'resize +1' 'command -c operate' bind -c operate - eval 'resize -1' 'command -c operate' caption splitonly "%3n %f %t" hardstatus alwayslastline "%{.wk}[%S] %-w %{.rd}%{!}%n %f%t%{.wk} %+w" ================================================ FILE: .slate.d/google_chrome.sh ================================================ #!/bin/sh open -a "Google Chrome" ================================================ FILE: .slate.js ================================================ S.configAll({ defaultToCurrentScreen: true, checkDefaultsOnLoad: true, modalEscapeKey: 'esc' }); var VI_LIKE_WINDOW_PLACEMENT_PREFIX_KEY = ['delete', 'ctrl', 'cmd'].join(','); var vi = function(key) { return [key, VI_LIKE_WINDOW_PLACEMENT_PREFIX_KEY, 'toggle'].join(':'); }; var pushLeftOp = slate.op('push', { direction: 'left', style: 'bar-resize:screenSizeX/2' }); var pushDownOp = slate.op('push', { direction: 'down', style: 'bar-resize:screenSizeY/2' }); var pushUpOp = slate.op('push', { direction: 'up', style: 'bar-resize:screenSizeY/2' }); var pushRightOp = slate.op('push', { direction: 'right', style: 'bar-resize:screenSizeX/2' }); var moveTopLeftOp = slate.op('move', { x: 0, y: 0, width: 'screenSizeX/2', height: 'screenSizeY/2' }); var moveTopRightOp = slate.op('move', { x: 'screenSizeX/2', y: 0, width: 'screenSizeX/2', height: 'screenSizeY/2' }); var moveBottomRightOp = S.op('move', { x: 'screenSizeX/2', y: 'screenSizeY/2', width: 'screenSizeX/2', height: 'screenSizeY/2' }); var moveBottomLeftOp = slate.op('move', { x: 0, y: 'screenSizeY/2', width: 'screenSizeX/2', height: 'screenSizeY/2' }); var moveFullOp = slate.op('move', { x: 0, y: 0, width: 'screenSizeX', height: 'screenSizeY' }); var moveCenterOp = (function () { var ratio = 0.75; var op = slate.op('move', { x: function () { return slate.screen().rect().width * ((1 - ratio) / 2); }, y: function () { return slate.screen().rect().height * ((1 - ratio) / 2); }, width: 'screenSizeX*0.75', height: 'screenSizeY*0.75', }); return op; })(); var viLikeWindowPlacements = { h: pushLeftOp, j: pushDownOp, k: pushUpOp, l: pushRightOp, i: moveTopLeftOp, o: moveTopRightOp, m: moveBottomRightOp, n: moveBottomLeftOp, 'return': moveFullOp, 'space': moveCenterOp, }; for (var key in viLikeWindowPlacements) { var op = viLikeWindowPlacements[key]; S.bind(vi(key), op); } S.bindAll({ 'r:ctrl,cmd': S.op('relaunch'), 'f:ctrl,cmd,shift': S.op('hint'), }); ================================================ FILE: .tigrc ================================================ set commit-order = topo set tab-size = 2 bind generic g move-first-line bind generic G move-last-line bind main o !@hub browse -- commit/%(commit) bind diff o !@hub browse -- commit/%(commit) bind log o !@hub browse -- commit/%(commit) bind generic C !@sh -c '/bin/echo -n %(commit) | pbcopy' bind diff C !@sh -c '/bin/echo -n %(commit) | pbcopy' bind diff r !git rebase --interactive %(commit)~1 ================================================ FILE: .tmux.conf ================================================ # key bindings ## prefix key unbind C-b bind C-k send-prefix set -g prefix C-k bind ^n next-window bind ^p previous-window bind ^c new-window bind n next-window bind p previous-window bind c new-window bind r source-file ~/.tmux.conf bind k confirm-before 'kill-window' bind -r ^"[" copy-mode bind -r ^] paste-buffer -s '' bind | split-window -h bind _ split-window -v ## copy mode unbind -T copy-mode-vi Space bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send -X copy-pipe "pbcopy" # options set -g history-limit 1000000 set -g default-terminal screen-256color ## status set -g status on set -g status-interval 1 set -g status-justify left set -g status-position top set -g status-left "" set -g status-left-length 20 set -g status-right "Battery:#($HOME/.tmux.d/scripts/macbook-battery) #($HOME/.tmux.d/scripts/today)" set -g status-bg black set -g status-fg white # window options setw -g automatic-rename off setw -g allow-rename on setw -g mode-keys vi setw -g window-status-current-style reverse setw -g window-status-current-format "#{window_index} #{window_name}" setw -g window-status-format "#{window_index} #{window_name}" set -g default-command 'reattach-to-user-namespace -l $SHELL' set -sg escape-time 30 ================================================ FILE: .tmux.d/scripts/macbook-battery ================================================ #!/bin/bash /usr/bin/pmset -g ps | /usr/bin/tail -1 | /usr/bin/awk '{ print $3 }' | /usr/bin/sed -e 's/;//g' ================================================ FILE: .tmux.d/scripts/today ================================================ #!/bin/bash set -ue export PATH=/usr/bin:/usr/sbin:/bin:/sbin date +'%H:%M' ================================================ FILE: .travis.yml ================================================ --- language: ruby rvm: - 2.1.1 install: - echo "Install" before_script: - mkdir -p $INSTALL_DIRECTORY script: - rake env: - INSTALL_DIRECTORY=tmp/home ================================================ FILE: .uim ================================================ ;; vim:set ft=scheme: (define default-im-name 'skk) (define skk-use-skkserv? #t) (define skk-serv-hostname "localhost") (define skk-serv-portnum 1178) ================================================ FILE: .vim/.eskk/.keep ================================================ ================================================ FILE: .vim/after/ftplugin/go.vim ================================================ inoremap = smartchr#loop(' := ', ' = ', ' == ', ' != ') inoremap , smartchr#loop(', ', '<-', ',') ================================================ FILE: .vim/after/ftplugin/haskell.vim ================================================ inoremap = smartchr#loop(' = ', '=') inoremap . smartchr#one_of('.', ' -> ', ' => ', '.') inoremap , smartchr#one_of(', ', ' <- ', ',') setlocal et ================================================ FILE: .vim/after/ftplugin/html.vim ================================================ inoremap = = ================================================ FILE: .vim/after/ftplugin/javascript.vim ================================================ inoremap = smartchr#loop(' = ', ' == ', ' === ') inoremap \ smartchr#one_of(' => ', '\') nnoremap kj :Unite -start-insert -default-action=split ref/javascript nnoremap kq :Unite -start-insert -default-action=split ref/jquery ================================================ FILE: .vim/after/ftplugin/perl.vim ================================================ let b:tap_run_command = expand('~/.vim/bin/prove-wrapper') inoremap . smartchr#one_of('.', '->', '.') inoremap , smartchr#one_of(', ', ' => ', ',') inoremap = smartchr#loop(' = ', ' == ', ' != ', ' =~ ', ' !~ ', ' <=> ', '=') ================================================ FILE: .vim/after/ftplugin/ruby.vim ================================================ inoremap = smartchr#loop(' = ', ' == ', ' === ', ' != ') inoremap , smartchr#loop(', ', ' => ', ',') nnoremap k :Unite -start-insert -default-action=split ref/refe nnoremap :UniteWithCursorWord -default-action=split ref/refe ================================================ FILE: .vim/after/ftplugin/scala.vim ================================================ inoremap ,t :EnType ================================================ FILE: .vim/after/ftplugin/sh.vim ================================================ inoremap = smartchr#loop('=', ' = ', ' != ') ================================================ FILE: .vim/after/ftplugin/tt2html.vim ================================================ autocmd MyInit FileType tt2html inoremap = = ================================================ FILE: .vim/after/ftplugin/typescript.vim ================================================ inoremap \ smartchr#one_of(' => ', '\') ================================================ FILE: .vim/after/ftplugin/vim.vim ================================================ inoremap = = ================================================ FILE: .vim/after/syntax/sh.vim ================================================ " exclude `--foo)` matches from within `$(cmd --foo)` syntax match shOption "\s\zs--[^ \t$`'"|)]\+" ================================================ FILE: .vim/bin/prove-wrapper ================================================ #!/bin/bash set -e env PERL5LIB="$PWD/lib:$PWD/local/lib/perl5" \ plenv exec perl $@ ================================================ FILE: .vim/colors/freya.vim ================================================ set background=dark hi clear if exists("syntax_on") syntax reset endif let colors_name = "freya" hi Normal ctermbg=0 ctermfg=7 cterm=none guibg=#2a2a2a guifg=#dcdccc gui=none hi Cursor guibg=fg guifg=bg gui=none hi CursorColumn guibg=#3f3f3f gui=none hi CursorLine guibg=#3f3f3f gui=none hi DiffAdd guibg=#008b00 guifg=fg gui=none hi DiffChange guibg=#00008b guifg=fg gui=none hi DiffDelete guibg=#8b0000 guifg=fg gui=none hi DiffText guibg=#0000cd guifg=fg gui=bold hi Directory guibg=bg guifg=#d4b064 gui=none hi ErrorMsg guibg=bg guifg=#f07070 gui=bold hi FoldColumn ctermbg=bg guibg=bg guifg=#c2b680 gui=none hi Folded guibg=#101010 guifg=#c2b680 gui=none hi IncSearch guibg=#866a4f guifg=fg gui=none hi LineNr guibg=bg guifg=#9f8f80 gui=none hi ModeMsg guibg=bg guifg=fg gui=bold hi MoreMsg guibg=bg guifg=#dabfa5 gui=bold hi NonText ctermfg=8 guibg=bg guifg=#9f8f80 gui=bold hi Pmenu guibg=#a78869 guifg=#000000 gui=none hi PmenuSbar guibg=#B99F86 guifg=fg gui=none hi PmenuSel guibg=#c0aa94 guifg=bg gui=none hi PmenuThumb guibg=#f7f7f1 guifg=bg gui=none hi Question guibg=bg guifg=#dabfa5 gui=bold hi Search guibg=#c0aa94 guifg=bg gui=none hi SignColumn ctermbg=bg guibg=bg guifg=#c2b680 gui=none hi SpecialKey guibg=bg guifg=#d4b064 gui=none if has("spell") hi SpellBad guisp=#f07070 gui=undercurl hi SpellCap guisp=#7070f0 gui=undercurl hi SpellLocal guisp=#70f0f0 gui=undercurl hi SpellRare guisp=#f070f0 gui=undercurl endif hi StatusLine ctermbg=7 ctermfg=0 guibg=#736559 guifg=#f7f7f1 gui=bold hi StatusLineNC ctermbg=8 ctermfg=0 guibg=#564d43 guifg=#f7f7f1 gui=none hi TabLine guibg=#564d43 guifg=#f7f7f1 gui=underline hi TabLineFill guibg=#564d43 guifg=#f7f7f1 gui=underline hi TabLineSel guibg=bg guifg=#f7f7f1 gui=bold hi Title ctermbg=0 ctermfg=15 guifg=#f7f7f1 gui=bold hi VertSplit ctermbg=7 ctermfg=0 guibg=#564d43 guifg=#f7f7f1 gui=none if version >= 700 hi Visual ctermbg=7 ctermfg=0 guibg=#5f5f5f gui=none else hi Visual ctermbg=7 ctermfg=0 guibg=#5f5f5f guifg=fg gui=none endif hi VisualNOS guibg=bg guifg=#c0aa94 gui=bold,underline hi WarningMsg guibg=bg guifg=#f07070 gui=none hi WildMenu guibg=#c0aa94 guifg=bg gui=bold hi Comment guibg=bg guifg=#c2b680 gui=none hi Constant guibg=bg guifg=#afe091 gui=none hi Error guibg=bg guifg=#f07070 gui=none hi Identifier guibg=bg guifg=#dabfa5 gui=none hi Ignore guibg=bg guifg=bg gui=none hi lCursor guibg=#c0aa94 guifg=bg gui=none hi MatchParen guibg=#008b8b gui=none hi PreProc guibg=bg guifg=#c2aed0 gui=none hi Special guibg=bg guifg=#d4b064 gui=none hi Statement guibg=bg guifg=#e0af91 gui=bold hi Todo guibg=#aed0ae guifg=bg gui=none hi Type guibg=bg guifg=#dabfa5 gui=bold hi Underlined guibg=bg guifg=#d4b064 gui=underline hi htmlBold ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold hi htmlItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=italic hi htmlUnderline ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=underline hi htmlBoldItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,italic hi htmlBoldUnderline ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,underline hi htmlBoldUnderlineItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,underline,italic hi htmlUnderlineItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=underline,italic ================================================ FILE: .vim/colors/github.vim ================================================ " Vim color file " " Author: Anthony Carapetis " " Note: Based on github's syntax highlighting theme " Used Brian Mock's darkspectrum as a starting point/template " Thanks to Ryan Heath for an easy list of some of the colours: " http://rpheath.com/posts/356-github-theme-for-syntax-gem hi clear set background=light if version > 580 " no guarantees for version 5.8 and below, but this makes it stop " complaining hi clear if exists("syntax_on") syntax reset endif endif let g:colors_name="github" hi Normal guifg=#000000 guibg=#F8F8FF " {{{ Cursor hi Cursor guibg=#444454 guifg=#F8F8FF hi CursorLine guibg=#D8D8DD hi CursorColumn guibg=#E8E8EE " }}} " {{{ Diff hi DiffAdd guifg=#003300 guibg=#DDFFDD gui=none hi DiffChange guibg=#ececec gui=none hi DiffText guifg=#000033 guibg=#DDDDFF gui=none hi DiffDelete guifg=#DDCCCC guibg=#FFDDDD gui=none " }}} " {{{ Folding / Line Numbering / Status Lines hi Folded guibg=#ECECEC guifg=#808080 gui=bold hi vimFold guibg=#ECECEC guifg=#808080 gui=bold hi FoldColumn guibg=#ECECEC guifg=#808080 gui=bold hi LineNr guifg=#959595 guibg=#ECECEC gui=bold hi NonText guifg=#808080 guibg=#ECECEC hi Folded guifg=#808080 guibg=#ECECEC gui=bold hi FoldeColumn guifg=#808080 guibg=#ECECEC gui=bold hi VertSplit guibg=#bbbbbb guifg=#bbbbbb gui=none hi StatusLine guibg=#bbbbbb guifg=#404040 gui=bold hi StatusLineNC guibg=#d4d4d4 guifg=#404040 gui=italic " }}} " {{{ Misc hi ModeMsg guifg=#990000 hi MoreMsg guifg=#990000 hi Title guifg=#ef5939 hi WarningMsg guifg=#ef5939 hi SpecialKey guifg=#177F80 gui=italic hi MatchParen guibg=#cdcdfd guifg=#000000 hi Underlined guifg=#000000 gui=underline hi Directory guifg=#990000 " }}} " {{{ Search, Visual, etc hi Visual guifg=#FFFFFF guibg=#3465a4 gui=none hi VisualNOS guifg=#FFFFFF guibg=#204a87 gui=none hi IncSearch guibg=#cdcdfd guifg=#000000 gui=italic hi Search guibg=#cdcdfd guifg=#000000 gui=italic " }}} " {{{ Syntax groups hi Ignore guifg=#808080 hi Identifier guifg=#0086B3 hi PreProc guifg=#A0A0A0 gui=bold hi Comment guifg=#999988 hi Constant guifg=#177F80 gui=none hi String guifg=#D81745 hi Function guifg=#990000 gui=bold hi Statement guifg=#000000 gui=bold hi Type guifg=#445588 gui=bold hi Number guifg=#1C9898 hi Todo guifg=#FFFFFF guibg=#990000 gui=bold hi Special guifg=#159828 gui=bold hi rubySymbol guifg=#960B73 hi Error guibg=#f8f8ff guifg=#ff1100 gui=undercurl hi Todo guibg=#f8f8ff guifg=#ff1100 gui=underline hi Label guifg=#000000 gui=bold hi StorageClass guifg=#000000 gui=bold hi Structure guifg=#000000 gui=bold hi TypeDef guifg=#000000 gui=bold " }}} " {{{ Completion menus hi WildMenu guifg=#7fbdff guibg=#425c78 gui=none hi Pmenu guibg=#808080 guifg=#ffffff gui=bold hi PmenuSel guibg=#cdcdfd guifg=#000000 gui=italic hi PmenuSbar guibg=#000000 guifg=#444444 hi PmenuThumb guibg=#aaaaaa guifg=#aaaaaa " }}} " {{{ Spelling hi spellBad guisp=#fcaf3e hi spellCap guisp=#73d216 hi spellRare guisp=#fcaf3e hi spellLocal guisp=#729fcf " }}} " {{{ Aliases hi link cppSTL Function hi link cppSTLType Type hi link Character Number hi link htmlTag htmlEndTag "hi link htmlTagName htmlTag hi link htmlLink Underlined hi link pythonFunction Identifier hi link Question Type hi link CursorIM Cursor hi link VisualNOS Visual hi link xmlTag Identifier hi link xmlTagName Identifier hi link shDeref Identifier hi link shVariable Function hi link rubySharpBang Special hi link perlSharpBang Special hi link schemeFunc Statement "hi link shSpecialVariables Constant "hi link bashSpecialVariables Constant " }}} " {{{ Tabs (non-gui0 hi TabLine guifg=#404040 guibg=#dddddd gui=none hi TabLineFill guifg=#404040 guibg=#dddddd gui=none hi TabLineSel guifg=#404040 gui=bold " }}} " " vim: sw=4 ts=4 foldmethod=marker ================================================ FILE: .vim/colors/liquidcarbon.vim ================================================ " File: liquidcarbon.vim " Author: Jeet Sukumaran " Description: Vim color file " Last Modified: October 06, 2010 " Initialization and Setup {{{1 " ============================================================================ set background=dark highlight clear if exists("syntax_on") syntax reset endif let colors_name = "liquidcarbon" " 1}}} " Normal Color {{{1 " ============================================================================ if exists("g:liquidcarbon_high_contrast") && g:liquidcarbon_high_contrast hi Normal guifg=#bdcdcd guibg=#202020 hi CursorLine guifg=NONE guibg=#292929 gui=NONE hi ColorColumn guifg=NONE guibg=#292929 else hi Normal guifg=#bdcdcd guibg=#303030 hi CursorLine guifg=NONE guibg=#3a3a3a gui=NONE hi ColorColumn guifg=NONE guibg=#3a3a3a endif " 1}}} " Core Highlights {{{1 " ============================================================================ hi Cursor guifg=bg guibg=fg gui=NONE hi CursorIM guifg=bg guibg=fg gui=NONE hi lCursor guifg=bg guibg=fg gui=NONE hi DiffAdd guifg=#000000 guibg=#3cb371 gui=NONE hi DiffChange guifg=#000000 guibg=#4f94cd gui=NONE hi DiffDelete guifg=#000000 guibg=#8b3626 gui=NONE hi DiffText guifg=#000000 guibg=#8ee5ee gui=NONE hi Directory guifg=#1e90ff guibg=bg gui=NONE hi ErrorMsg guifg=#ff6a6a guibg=NONE gui=bold hi FoldColumn guifg=#68838b guibg=#4B4B4B gui=bold hi Folded guifg=#68838b guibg=#4B4B4B gui=NONE hi IncSearch guifg=#ffffff guibg=#ff4500 gui=bold hi LineNr guifg=#767676 guibg=#000000 gui=NONE hi MatchParen guifg=#fff000 guibg=#000000 gui=bold hi ModeMsg guifg=#000000 guibg=#00ff00 gui=bold hi MoreMsg guifg=#2e8b57 guibg=bg gui=bold hi NonText guifg=#9ac0cd guibg=bg gui=NONE hi Pmenu guifg=#0000ff guibg=#c0c8cf gui=bold hi PmenuSel guifg=#c0c8cf guibg=#0000ff gui=bold hi PmenuSbar guifg=#ffffff guibg=#c1cdc1 gui=NONE hi PmenuThumb guifg=#ffffff guibg=#838b83 gui=NONE hi Question guifg=#00ee00 guibg=NONE gui=bold hi Search guifg=#000000 guibg=#fff68f gui=bold hi SignColumn guifg=#ffffff guibg=#cdcdb4 gui=NONE hi SpecialKey guifg=#666666 guibg=NONE gui=NONE hi SpellBad guisp=#ee2c2c gui=undercurl hi SpellCap guisp=#0000ff gui=undercurl hi SpellLocal guisp=#008b8b gui=undercurl hi SpellRare guisp=#ff00ff gui=undercurl hi StatusLine guifg=#ddeeff guibg=#445566 gui=NONE hi StatusLineNC guifg=#999999 guibg=#445566 gui=italic hi TabLine guifg=fg guibg=#d3d3d3 gui=underline hi TabLineFill guifg=fg guibg=bg gui=reverse hi TabLineSel guifg=fg guibg=bg gui=bold hi Title guifg=#009acd guibg=bg gui=bold hi VertSplit guifg=#445566 guibg=#445566 hi Visual guifg=#000000 guibg=#90ccff gui=NONE hi WarningMsg guifg=#ee9a00 guibg=bg gui=NONE hi WildMenu guifg=#000000 guibg=#87ceeb gui=NONE " 1}}} " Syntax {{{1 " ============================================================================ " General {{{2 " ----------------------------------------------------------------------------- hi Comment guifg=#809090 guibg=NONE gui=italic hi Constant guifg=#cdad00 guibg=NONE gui=NONE hi String guifg=#559b70 guibg=NONE gui=NONE hi Boolean guifg=#cd69c9 guibg=NONE gui=NONE hi Identifier guifg=#9f79ee guibg=NONE gui=NONE hi Function guifg=#92a5de guibg=NONE gui=NONE hi Statement guifg=#009acd guibg=NONE gui=NONE hi PreProc guifg=#009acd guibg=NONE gui=NONE hi Keyword guifg=#7ac5cd guibg=NONE gui=NONE hi Type guifg=#4169e1 guibg=NONE gui=NONE hi Special guifg=#7f9f44 guibg=NONE gui=NONE hi Ignore guifg=bg guibg=NONE gui=NONE hi Error guifg=#ff3030 guibg=NONE gui=underline hi Todo guifg=#ff88ee guibg=NONE gui=bold " 2}}} " Vim {{{2 " ----------------------------------------------------------------------------- hi VimError guifg=#ff0000 guibg=#000000 gui=bold hi VimCommentTitle guifg=#528b8b guibg=bg gui=bold,italic " 2}}} " QuickFix {{{2 " ----------------------------------------------------------------------------- hi qfFileName guifg=#607b8b guibg=NONE gui=italic hi qfLineNr guifg=#0088aa guibg=NONE gui=bold hi qfError guifg=#ff0000 guibg=NONE gui=bold " 2}}} " Python {{{2 " ----------------------------------------------------------------------------- hi pythonDecorator guifg=#cd8500 guibg=NONE gui=NONE hi link pythonDecoratorFunction pythonDecorator " 2}}} " Diff {{{2 " ----------------------------------------------------------------------------- hi diffOldFile guifg=#da70d6 guibg=NONE gui=italic hi diffNewFile guifg=#ffff00 guibg=NONE gui=italic hi diffFile guifg=#ffa500 guibg=NONE gui=italic hi diffLine guifg=#ff00ff guibg=NONE gui=italic hi link diffOnly Constant hi link diffIdentical Constant hi link diffDiffer Constant hi link diffBDiffer Constant hi link diffIsA Constant hi link diffNoEOL Constant hi link diffCommon Constant hi diffRemoved guifg=#cd5555 guibg=NONE gui=NONE hi diffChanged guifg=#4f94cd guibg=NONE gui=NONE hi diffAdded guifg=#00cd00 guibg=NONE gui=NONE hi link diffSubname diffLine hi link diffComment Comment " 2}}} " 1}}} ================================================ FILE: .vim/colors/navajo-night.vim ================================================ " Vim colour file " Maintainer: Matthew Hawkins " Last Change: Mon, 22 Apr 2002 15:28:04 +1000 " URI: http://mh.dropbear.id.au/vim/navajo-night.png " " This colour scheme uses a "navajo-black" background " I have added colours for the statusbar and for spell checking " as taken from Cream (http://cream.sf.net/) set background=dark hi clear if exists("syntax_on") syntax reset endif let g:colors_name = "navajo-night" " This is the list of colour changes from Navajo that " weren't a simple mathematical subtraction from 0xffffff " DarkBlue -> #ffff74 " DarkRed -> #74ffff " DarkGreen -> #ff9bff " DarkCyan -> #ff7474 " DarkMagenta -> #74ff74 " DarkYellow -> #7474ff " DarkGray -> #565656 " Blue -> Yellow " Red -> Cyan " Yellow -> Blue " Gray -> #414141 " Brown -> #5ad5d5 " #ff8060 -> #007f9f " #f6e8d0 -> #09172f " #edb5cd -> #124a32 " #c0c0c0 -> #3f3f3f " #907050 -> #6f8faf " #808080 -> #7f7f7f " #707070 -> #8f8f8f " SeaGreen -> #d174a8 " LightRed (assuming #ee9090) -> #116f6f " LightBlue -> #522719 hi Normal ctermfg=White guifg=White guibg=#35536f hi SpecialKey term=bold ctermfg=darkblue guifg=Yellow hi NonText term=bold ctermfg=darkblue cterm=bold gui=bold guifg=#7f7f7f hi Directory term=bold ctermfg=darkblue guifg=Yellow hi ErrorMsg term=standout ctermfg=grey ctermbg=darkred cterm=bold gui=bold guifg=Black guibg=Cyan hi IncSearch term=reverse cterm=reverse gui=reverse hi Search term=reverse ctermbg=White ctermfg=Black cterm=reverse guibg=Black guifg=Yellow hi MoreMsg term=bold ctermfg=green gui=bold guifg=#d174a8 hi ModeMsg term=bold cterm=bold gui=bold hi LineNr term=underline ctermfg=darkcyan ctermbg=grey guibg=#7f7f7f gui=bold guifg=White hi Question term=standout ctermfg=darkgreen gui=bold guifg=#d174a8 hi StatusLine term=bold,reverse cterm=bold,reverse gui=bold guifg=Black guibg=White hi StatusLineNC term=reverse cterm=reverse gui=bold guifg=#116f6f guibg=#8f8f8f hi VertSplit term=reverse cterm=reverse gui=bold guifg=Black guibg=#8f8f8f hi Title term=bold ctermfg=green gui=bold guifg=#74ff74 "+++ Cream: "hi Visual term=reverse cterm=reverse gui=reverse guifg=#3f3f3f guibg=White "+++ hi VisualNOS term=bold,underline cterm=bold,underline gui=reverse guifg=#414141 guibg=Black hi WarningMsg term=standout ctermfg=darkred gui=bold guifg=Cyan hi WildMenu term=standout ctermfg=White ctermbg=darkyellow guifg=White guibg=Blue hi Folded term=standout ctermfg=darkblue ctermbg=grey guifg=White guibg=NONE guifg=#afcfef hi FoldColumn term=standout ctermfg=darkblue ctermbg=grey guifg=#ffff74 guibg=#3f3f3f hi DiffAdd term=bold ctermbg=darkblue guibg=Black hi DiffChange term=bold ctermbg=darkmagenta guibg=#124a32 hi DiffDelete term=bold ctermfg=darkblue ctermbg=blue cterm=bold gui=bold guifg=#522719 guibg=#09172f hi DiffText term=reverse ctermbg=darkblue cterm=bold gui=bold guibg=#007f9f hi Cursor gui=reverse guifg=#bfbfef guibg=Black hi lCursor guifg=fg guibg=bg hi Match term=bold,reverse ctermbg=Blue ctermfg=Yellow cterm=bold,reverse gui=bold,reverse guifg=Blue guibg=Yellow " Colours for syntax highlighting hi Comment term=bold ctermfg=darkblue guifg=#e7e77f hi Constant term=underline ctermfg=darkred guifg=#3fffa7 hi Special term=bold ctermfg=darkgreen guifg=#bfbfef hi Identifier term=underline ctermfg=darkcyan cterm=NONE guifg=#ef9f9f hi Statement term=bold ctermfg=darkred cterm=bold gui=bold guifg=#5ad5d5 hi PreProc term=underline ctermfg=darkmagenta guifg=#74ff74 hi Type term=underline ctermfg=green gui=bold guifg=#d174a8 hi Ignore ctermfg=grey cterm=bold guifg=bg hi Error term=reverse ctermfg=grey ctermbg=darkred cterm=bold gui=bold guifg=Black guibg=Cyan hi Todo term=standout ctermfg=darkblue ctermbg=Blue guifg=Yellow guibg=Blue "+++ Cream: statusbar " Colours for statusbar "hi User1 gui=bold guifg=#565656 guibg=#0c0c0c "hi User2 gui=bold guifg=White guibg=#0c0c0c "hi User3 gui=bold guifg=Yellow guibg=#0c0c0c "hi User4 gui=bold guifg=Cyan guibg=#0c0c0c highlight User1 gui=bold guifg=#999933 guibg=#45637f highlight User2 gui=bold guifg=#e7e77f guibg=#45637f highlight User3 gui=bold guifg=Black guibg=#45637f highlight User4 gui=bold guifg=#33cc99 guibg=#45637f "+++ "+++ Cream: selection highlight Visual gui=bold guifg=Black guibg=#aacc77 "+++ "+++ Cream: bookmarks highlight Cream_ShowMarksHL ctermfg=blue ctermbg=lightblue cterm=bold guifg=Black guibg=#aacc77 gui=bold "+++ "+++ Cream: spell check " Colour misspelt words "hi BadWord ctermfg=White ctermbg=darkred cterm=bold guifg=Yellow guibg=#522719 gui=bold " mathematically correct: "highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=White guibg=#003333 " adjusted: highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=#ff9999 guibg=#003333 "+++ ================================================ FILE: .vim/colors/railscasts.vim ================================================ " Vim color scheme " " Name: railscasts.vim " Maintainer: Nick Moffitt " Last Change: 01 Mar 2008 " License: WTFPL " Version: 2.1 " " This theme is based on Josh O'Rourke's Vim clone of the railscast " textmate theme. The key thing I have done here is supply 256-color " terminal equivalents for as many of the colors as possible, and fixed " up some of the funny behaviors for editing e-mails and such. " " To use for gvim: " 1: install this file as ~/.vim/colors/railscasts.vim " 2: put "colorscheme railscasts" in your .gvimrc " " If you are using Ubuntu, you can get the benefit of this in your " terminals using ordinary vim by taking the following steps: " " 1: sudo apt-get install ncurses-term " 2: put the following in your .vimrc " if $COLORTERM == 'gnome-terminal' " set term=gnome-256color " colorscheme railscasts " else " colorscheme default " endif " 3: if you wish to use this with screen, add the following to your .screenrc: " attrcolor b ".I" " termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' " defbce "on" " term screen-256color-bce set background=dark hi clear if exists("syntax_on") syntax reset endif let g:colors_name = "railscasts" hi link htmlTag xmlTag hi link htmlTagName xmlTagName hi link htmlEndTag xmlEndTag highlight Normal guifg=#E6E1DC guibg=#111111 highlight Cursor guifg=#000000 ctermfg=0 guibg=#FFFFFF ctermbg=15 highlight CursorLine guibg=#000000 ctermbg=233 cterm=NONE highlight Comment guifg=#BC9458 ctermfg=180 gui=italic highlight Constant guifg=#6D9CBE ctermfg=73 highlight Define guifg=#CC7833 ctermfg=173 highlight Error guifg=#FFC66D ctermfg=221 guibg=#990000 ctermbg=88 highlight Function guifg=#FFC66D ctermfg=221 gui=NONE cterm=NONE highlight Identifier guifg=#6D9CBE ctermfg=73 gui=NONE cterm=NONE highlight Include guifg=#CC7833 ctermfg=173 gui=NONE cterm=NONE highlight PreCondit guifg=#CC7833 ctermfg=173 gui=NONE cterm=NONE highlight Keyword guifg=#CC7833 ctermfg=173 cterm=NONE highlight LineNr guifg=#2B2B2B ctermfg=159 guibg=#C0C0FF highlight Number guifg=#A5C261 ctermfg=107 highlight PreProc guifg=#E6E1DC ctermfg=103 highlight Search guifg=NONE ctermfg=NONE guibg=#2b2b2b ctermbg=235 gui=italic cterm=underline highlight Statement guifg=#CC7833 ctermfg=173 gui=NONE cterm=NONE highlight String guifg=#A5C261 ctermfg=107 highlight Title guifg=#FFFFFF ctermfg=15 highlight Type guifg=#DA4939 ctermfg=167 gui=NONE cterm=NONE highlight Visual guibg=#5A647E ctermbg=60 highlight DiffAdd guifg=#E6E1DC ctermfg=7 guibg=#519F50 ctermbg=71 highlight DiffDelete guifg=#E6E1DC ctermfg=7 guibg=#660000 ctermbg=52 highlight Special guifg=#DA4939 ctermfg=167 highlight pythonBuiltin guifg=#6D9CBE ctermfg=73 gui=NONE cterm=NONE highlight rubyBlockParameter guifg=#FFFFFF ctermfg=15 highlight rubyClass guifg=#FFFFFF ctermfg=15 highlight rubyConstant guifg=#DA4939 ctermfg=167 highlight rubyInstanceVariable guifg=#D0D0FF ctermfg=189 highlight rubyInterpolation guifg=#519F50 ctermfg=107 highlight rubyLocalVariableOrMethod guifg=#D0D0FF ctermfg=189 highlight rubyPredefinedConstant guifg=#DA4939 ctermfg=167 highlight rubyPseudoVariable guifg=#FFC66D ctermfg=221 highlight rubyStringDelimiter guifg=#A5C261 ctermfg=143 highlight xmlTag guifg=#E8BF6A ctermfg=179 highlight xmlTagName guifg=#E8BF6A ctermfg=179 highlight xmlEndTag guifg=#E8BF6A ctermfg=179 highlight mailSubject guifg=#A5C261 ctermfg=107 highlight mailHeaderKey guifg=#FFC66D ctermfg=221 highlight mailEmail guifg=#A5C261 ctermfg=107 gui=italic cterm=underline highlight SpellBad guifg=#D70000 ctermfg=160 ctermbg=NONE cterm=underline highlight SpellRare guifg=#D75F87 ctermfg=168 guibg=NONE ctermbg=NONE gui=underline cterm=underline highlight SpellCap guifg=#D0D0FF ctermfg=189 guibg=NONE ctermbg=NONE gui=underline cterm=underline highlight MatchParen guifg=#FFFFFF ctermfg=15 guibg=#005f5f ctermbg=23 ================================================ FILE: .vim/colors/shandy.vim ================================================ set bg=dark hi clear if exists("syntax_on") syntax reset endif let colors_name = "shandy" " blue: #7d95a6 " red: #a67d7d " yellow: #a6a67d " green: #7da67d " light green: #7da69d " purple: #817da6 " violet: #997da6 " magenta: #a67d92 hi Normal guifg=#aaacb3 guibg=#1a1a1a hi Cursor guifg=bg guibg=fg hi MatchParen guifg=fg guibg=bg gui=underline hi NonText guifg=#454545 hi SpecialKey guifg=#454545 hi LineNr guifg=#626872 hi Visual guifg=fg guibg=#738499 hi Title guifg=#a6a67d hi StatusLine guifg=fg guibg=#5b6477 gui=none hi StatusLineNC guifg=#000000 guibg=#c1c8d6 gui=none " DiffAdd " DiffChange " DiffDelete " DiffText hi ModeMsg guifg=#98a3b2 hi MoreMsg guifg=#98a3b2 hi ErrorMsg guifg=#a67d7d guibg=fg gui=reverse hi WarningMsg guifg=#a6a67d guibg=fg gui=reverse hi Pmenu guibg=#5b6477 hi PmenuSel guifg=fg guibg=bg gui=reverse hi Comment guifg=#575d66 hi Constant guifg=#7d95a6 hi Identifier guifg=#7d95a6 hi Statement guifg=#626872 hi PreProc guifg=#626872 hi Type guifg=#997da6 hi Delimiter guifg=#98a3b2 hi Special guifg=#a6a67d hi Error guifg=#a67d7d guibg=fg gui=reverse hi Todo guifg=#98a3b2 gui=underline ================================================ FILE: .vim/colors/tiro_finale.vim ================================================ hi clear if exists("syntax_on") syntax reset endif let colors_name = "tiro_finale" set background=dark " #e7abc2 #e78baf #c2537e #754d5c #550726 " #633008 #876d59 #e19860 #f3bc92 #f3cfb4 " #053d39 #365351 #3b8a84 #7ed1cb #9bd1cd " #345a08 #677a50 #96cc57 #c0eb8d #cfebae hi Normal guifg=#eaeaea guibg=#121111 hi SpecialKey guifg=#555555 hi Cursor guifg=bg guibg=fg hi CursorLine guifg=fg guibg=bg gui=underline hi LineNr guifg=#e7abc2 hi MatchParen gui=underline cterm=underline hi NonText guifg=#872c2a hi DiffAdd guifg=#5f8486 guibg=bg hi DiffChange guifg=#e19860 guibg=bg hi DiffDelete guifg=#876d59 guibg=bg hi DiffText guifg=fg guibg=bg gui=underline hi Pmenu guibg=#6e0b23 hi PmenuSel guifg=#121111 guibg=#dddddd gui=bold hi PmenuSbar guifg=#dddddd guibg=#dddddd hi Search guifg=bg guibg=#e39343 gui=underline,bold hi IncSearch guifg=bg guibg=#e39343 gui=underline,bold hi StatusLine guifg=#121111 guibg=#e19860 gui=NONE hi StatusLineNC guifg=#e19860 guibg=#121111 gui=underline hi MoreMsg guifg=#306ada hi ModeMsg guifg=#cccccc hi ErrorMsg guifg=white guibg=#6e0b23 hi Todo guifg=fg guibg=bg gui=underline hi Title guifg=#c2537e hi WarningMsg guifg=#e39343 hi Comment guifg=#876d59 hi Constant guifg=#f3bc92 hi Statement guifg=#e19860 hi PreProc guifg=#e19860 hi Identifier guifg=#5f8486 hi Type guifg=#c2537e hi Delimiter guifg=#555555 hi Special guifg=#e39343 ================================================ FILE: .vim/colors/wombat256mod.vim ================================================ " Vim color file " Original Maintainer: Lars H. Nielsen (dengmao@gmail.com) " Last Change: 2010-07-23 " " Modified version of wombat for 256-color terminals by " David Liang (bmdavll@gmail.com) " based on version by " Danila Bespalov (danila.bespalov@gmail.com) set background=dark if version > 580 hi clear if exists("syntax_on") syntax reset endif endif let colors_name = "wombat256mod" " General colors hi Normal ctermfg=252 ctermbg=234 cterm=none guifg=#e3e0d7 guibg=#242424 gui=none hi Cursor ctermfg=234 ctermbg=228 cterm=none guifg=#242424 guibg=#eae788 gui=none hi Visual ctermfg=251 ctermbg=239 cterm=none guifg=#c3c6ca guibg=#554d4b gui=none hi VisualNOS ctermfg=251 ctermbg=236 cterm=none guifg=#c3c6ca guibg=#303030 gui=none hi Search ctermfg=177 ctermbg=241 cterm=none guifg=#d787ff guibg=#636066 gui=none hi Folded ctermfg=103 ctermbg=237 cterm=none guifg=#a0a8b0 guibg=#3a4046 gui=none hi Title ctermfg=230 cterm=bold guifg=#ffffd7 gui=bold hi StatusLine ctermfg=230 ctermbg=238 cterm=none guifg=#ffffd7 guibg=#444444 gui=italic hi VertSplit ctermfg=238 ctermbg=238 cterm=none guifg=#444444 guibg=#444444 gui=none hi StatusLineNC ctermfg=241 ctermbg=238 cterm=none guifg=#857b6f guibg=#444444 gui=none hi LineNr ctermfg=241 ctermbg=232 cterm=none guifg=#857b6f guibg=#080808 gui=none hi SpecialKey ctermfg=241 ctermbg=235 cterm=none guifg=#626262 guibg=#2b2b2b gui=none hi WarningMsg ctermfg=203 guifg=#ff5f55 hi ErrorMsg ctermfg=196 ctermbg=236 cterm=bold guifg=#ff2026 guibg=#3a3a3a gui=bold " Vim >= 7.0 specific colors if version >= 700 hi CursorLine ctermbg=236 cterm=none guibg=#32322f hi MatchParen ctermfg=228 ctermbg=101 cterm=bold guifg=#eae788 guibg=#857b6f gui=bold hi Pmenu ctermfg=230 ctermbg=238 guifg=#ffffd7 guibg=#444444 hi PmenuSel ctermfg=232 ctermbg=192 guifg=#080808 guibg=#cae982 endif " Diff highlighting hi DiffAdd ctermbg=17 guibg=#2a0d6a hi DiffDelete ctermfg=234 ctermbg=60 cterm=none guifg=#242424 guibg=#3e3969 gui=none hi DiffText ctermbg=53 cterm=none guibg=#73186e gui=none hi DiffChange ctermbg=237 guibg=#382a37 "hi CursorIM "hi Directory "hi IncSearch "hi Menu "hi ModeMsg "hi MoreMsg "hi PmenuSbar "hi PmenuThumb "hi Question "hi Scrollbar "hi SignColumn "hi SpellBad "hi SpellCap "hi SpellLocal "hi SpellRare "hi TabLine "hi TabLineFill "hi TabLineSel "hi Tooltip "hi User1 "hi User9 "hi WildMenu " Syntax highlighting hi Keyword ctermfg=111 cterm=none guifg=#88b8f6 gui=none hi Statement ctermfg=111 cterm=none guifg=#88b8f6 gui=none hi Constant ctermfg=173 cterm=none guifg=#e5786d gui=none hi Number ctermfg=173 cterm=none guifg=#e5786d gui=none hi PreProc ctermfg=173 cterm=none guifg=#e5786d gui=none hi Function ctermfg=192 cterm=none guifg=#cae982 gui=none hi Identifier ctermfg=192 cterm=none guifg=#cae982 gui=none hi Type ctermfg=186 cterm=none guifg=#d4d987 gui=none hi Special ctermfg=229 cterm=none guifg=#eadead gui=none hi String ctermfg=113 cterm=none guifg=#95e454 gui=italic hi Comment ctermfg=246 cterm=none guifg=#9c998e gui=italic hi Todo ctermfg=101 cterm=none guifg=#857b6f gui=italic " Links hi! link FoldColumn Folded hi! link CursorColumn CursorLine hi! link NonText LineNr " vim:set ts=4 sw=4 noet: ================================================ FILE: .vim/colors/xoria256.vim ================================================ " Vim color file " " Name: xoria256.vim " Version: 1.5 " Maintainer: Dmitriy Y. Zotikov (xio) " " Should work in recent 256 color terminals. 88-color terms like urxvt are " NOT supported. " " Don't forget to install 'ncurses-term' and set TERM to xterm-256color or " similar value. " " Color numbers (0-255) see: " http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html " " For a specific filetype highlighting rules issue :syntax list when a file of " that type is opened. " Initialization {{{ if &t_Co != 256 && ! has("gui_running") echomsg "" echomsg "err: please use GUI or a 256-color terminal (so that t_Co=256 could be set)" echomsg "" finish endif set background=dark hi clear if exists("syntax_on") syntax reset endif let colors_name = "xoria256" "}}} " Colours {{{1 "" General {{{2 hi Normal ctermfg=252 guifg=#d0d0d0 ctermbg=234 guibg=#1c1c1c cterm=none gui=none hi Cursor ctermbg=214 guibg=#ffaf00 hi CursorColumn ctermbg=238 guibg=#444444 hi CursorLine ctermbg=237 guibg=#3a3a3a cterm=none gui=none hi Error ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000 hi ErrorMsg ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000 hi FoldColumn ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212 hi Folded ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87 hi IncSearch ctermfg=0 guifg=#000000 ctermbg=223 guibg=#ffdfaf cterm=none gui=none hi LineNr ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212 hi MatchParen ctermfg=188 guifg=#dfdfdf ctermbg=68 guibg=#5f87df cterm=bold gui=bold " TODO " hi MoreMsg hi NonText ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212 cterm=bold gui=bold hi Pmenu ctermfg=0 guifg=#000000 ctermbg=250 guibg=#bcbcbc hi PmenuSel ctermfg=255 guifg=#eeeeee ctermbg=243 guibg=#767676 hi PmenuSbar ctermbg=252 guibg=#d0d0d0 hi PmenuThumb ctermfg=243 guifg=#767676 hi Search ctermfg=0 guifg=#000000 ctermbg=149 guibg=#afdf5f hi SignColumn ctermfg=248 guifg=#a8a8a8 hi SpecialKey ctermfg=77 guifg=#5fdf5f hi SpellBad ctermfg=160 guifg=fg ctermbg=bg cterm=underline guisp=#df0000 hi SpellCap ctermfg=189 guifg=#dfdfff ctermbg=bg guibg=bg cterm=underline gui=underline hi SpellRare ctermfg=168 guifg=#df5f87 ctermbg=bg guibg=bg cterm=underline gui=underline hi SpellLocal ctermfg=98 guifg=#875fdf ctermbg=bg guibg=bg cterm=underline gui=underline hi StatusLine ctermfg=15 guifg=#ffffff ctermbg=239 guibg=#4e4e4e cterm=bold gui=bold hi StatusLineNC ctermfg=249 guifg=#b2b2b2 ctermbg=237 guibg=#3a3a3a cterm=none gui=none hi TabLine ctermfg=fg guifg=fg ctermbg=242 guibg=#666666 cterm=none gui=none hi TabLineFill ctermfg=fg guifg=fg ctermbg=237 guibg=#3a3a3a cterm=none gui=none " FIXME hi Title ctermfg=225 guifg=#ffdfff hi Todo ctermfg=0 guifg=#000000 ctermbg=184 guibg=#dfdf00 hi Underlined ctermfg=39 guifg=#00afff cterm=underline gui=underline hi VertSplit ctermfg=237 guifg=#3a3a3a ctermbg=237 guibg=#3a3a3a cterm=none gui=none " hi VIsualNOS ctermfg=24 guifg=#005f87 ctermbg=153 guibg=#afdfff cterm=none gui=none " hi Visual ctermfg=24 guifg=#005f87 ctermbg=153 guibg=#afdfff hi Visual ctermfg=255 guifg=#eeeeee ctermbg=96 guibg=#875f87 " hi Visual ctermfg=255 guifg=#eeeeee ctermbg=24 guibg=#005f87 hi VisualNOS ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87 hi WildMenu ctermfg=0 guifg=#000000 ctermbg=150 guibg=#afdf87 cterm=bold gui=bold "" Syntax highlighting {{{2 hi Comment ctermfg=244 guifg=#808080 hi Constant ctermfg=229 guifg=#ffffaf hi Identifier ctermfg=182 guifg=#dfafdf cterm=none hi Ignore ctermfg=238 guifg=#444444 hi Number ctermfg=180 guifg=#dfaf87 hi PreProc ctermfg=150 guifg=#afdf87 hi Special ctermfg=174 guifg=#df8787 hi Statement ctermfg=110 guifg=#87afdf cterm=none gui=none hi Type ctermfg=146 guifg=#afafdf cterm=none gui=none "" Special {{{2 """ .diff {{{3 hi diffAdded ctermfg=150 guifg=#afdf87 hi diffRemoved ctermfg=174 guifg=#df8787 """ vimdiff {{{3 hi diffAdd ctermfg=bg guifg=bg ctermbg=151 guibg=#afdfaf "hi diffDelete ctermfg=bg guifg=bg ctermbg=186 guibg=#dfdf87 cterm=none gui=none hi diffDelete ctermfg=bg guifg=bg ctermbg=246 guibg=#949494 cterm=none gui=none hi diffChange ctermfg=bg guifg=bg ctermbg=181 guibg=#dfafaf hi diffText ctermfg=bg guifg=bg ctermbg=174 guibg=#df8787 cterm=none gui=none """ HTML {{{3 " hi htmlTag ctermfg=146 guifg=#afafdf " hi htmlEndTag ctermfg=146 guifg=#afafdf hi htmlTag ctermfg=244 hi htmlEndTag ctermfg=244 hi htmlArg ctermfg=182 guifg=#dfafdf hi htmlValue ctermfg=187 guifg=#dfdfaf hi htmlTitle ctermfg=254 ctermbg=95 " hi htmlArg ctermfg=146 " hi htmlTagName ctermfg=146 " hi htmlString ctermfg=187 """ django {{{3 hi djangoVarBlock ctermfg=180 hi djangoTagBlock ctermfg=150 hi djangoStatement ctermfg=146 hi djangoFilter ctermfg=174 """ python {{{3 hi pythonExceptions ctermfg=174 """ NERDTree {{{3 hi Directory ctermfg=110 guifg=#87afdf hi treeCWD ctermfg=180 guifg=#dfaf87 hi treeClosable ctermfg=174 guifg=#df8787 hi treeOpenable ctermfg=150 guifg=#afdf87 hi treePart ctermfg=244 guifg=#808080 hi treeDirSlash ctermfg=244 guifg=#808080 hi treeLink ctermfg=182 guifg=#dfafdf """ VimDebug {{{3 " FIXME " you may want to set SignColumn highlight in your .vimrc " :help sign " :help SignColumn " hi currentLine term=reverse cterm=reverse gui=reverse " hi breakPoint term=NONE cterm=NONE gui=NONE " hi empty term=NONE cterm=NONE gui=NONE " sign define currentLine linehl=currentLine " sign define breakPoint linehl=breakPoint text=>> " sign define both linehl=currentLine text=>> " sign define empty linehl=empty ================================================ FILE: .vim/colors/zenesque.vim ================================================ " ============================================================================= " File: zenesque.vim " Description: Vim color scheme file " Maintainer: Paul L " ============================================================================= set background=light highlight clear if exists("syntax_on") syntax reset endif let colors_name = "zenesque" " ============================================================================= " default scheme hi Normal guifg=#000000 guibg=#e0e0d8 gui=NONE hi CursorLine guifg=NONE guibg=#e1e1d0 gui=NONE hi CursorColumn guifg=NONE guibg=#e1e1d0 gui=NONE hi LineNr guifg=#a9a99e guibg=NONE gui=NONE hi Constant guifg=#353535 guibg=NONE gui=bold hi Statement guifg=#363636 guibg=NONE gui=italic hi Function guifg=fg guibg=NONE gui=bold hi String guifg=#3c3c3c guibg=NONE gui=NONE hi Type guifg=#616161 guibg=NONE gui=bold,italic hi Conditional guifg=#4d4d4d guibg=NONE gui=bold hi Todo guifg=fg guibg=NONE gui=bold,underline hi Comment guifg=#797979 guibg=NONE gui=italic hi PmenuSel guifg=fg guibg=#a9a9aa gui=bold hi ColorColumn guifg=NONE guibg=#e6e6e6 hi Cursor guifg=bg guibg=fg gui=NONE hi CursorIM guifg=bg guibg=fg gui=NONE hi lCursor guifg=bg guibg=fg gui=NONE hi DiffAdd guifg=NONE guibg=#d1d1d1 gui=NONE hi DiffChange guifg=NONE guibg=#9d9d9d gui=NONE hi DiffDelete guifg=NONE guibg=#949494 gui=NONE hi DiffText guifg=#000000 guibg=#bababa gui=bold hi Directory guifg=#525252 guibg=bg gui=NONE hi ErrorMsg guifg=#6f6f6f guibg=NONE gui=NONE hi FoldColumn guifg=#555555 guibg=#cccbcb gui=bold hi Folded guifg=#555555 guibg=#cccccc gui=italic hi IncSearch guifg=#000000 guibg=#adadad gui=NONE hi Search guifg=#000000 guibg=#c5c3c3 gui=NONE hi MatchParen guifg=#000000 guibg=#a8a8a8 gui=bold hi ModeMsg guifg=#ffffff guibg=#767676 gui=bold hi MoreMsg guifg=#7c7c7c guibg=bg gui=bold hi NonText guifg=#7e7e7e guibg=bg gui=bold hi Pmenu guifg=#646564 guibg=#b1b2b1 gui=reverse hi PmenuSbar guifg=#ffffff guibg=#989898 gui=NONE hi PmenuThumb guifg=#ffffff guibg=#777777 gui=NONE hi Question guifg=#454545 guibg=bg gui=bold hi SignColumn guifg=#ffffff guibg=#696969 gui=NONE hi SpecialKey guifg=#ffffff guibg=#696969 gui=NONE hi SpellBad guisp=#323232 guibg=#d1cdcd gui=undercurl hi SpellCap guisp=#5d5d5d gui=undercurl hi SpellLocal guisp=#434343 gui=undercurl hi SpellRare guisp=#7d7d7d gui=undercurl hi StatusLine guifg=#e8e8e8 guibg=#858585 gui=bold hi StatusLineNC guifg=#808080 guibg=#bbbbbb gui=italic hi TabLine guifg=fg guibg=#898a8b gui=underline hi TabLineFill guifg=fg guibg=bg gui=reverse hi TabLineSel guifg=fg guibg=bg gui=bold hi Title guifg=#6d6d6d guibg=bg gui=bold hi VertSplit guifg=#b9b9b9 guibg=#b9b9b9 hi Visual guifg=#ffffff guibg=#9a9a9a gui=NONE hi WarningMsg guifg=#cfcfcf guibg=#5b5b5b gui=NONE hi WildMenu guifg=#000000 guibg=#c2c2c2 gui=NONE hi Boolean guifg=#616060 guibg=NONE gui=bold hi Identifier guifg=#141414 guibg=NONE gui=bold hi Keyword guifg=#666666 guibg=NONE gui=underline hi PreProc guifg=#6b6b6b guibg=NONE gui=NONE hi Special guifg=#6e6e6e guibg=NONE gui=NONE hi Ignore guifg=bg guibg=NONE gui=NONE hi Error guifg=#727272 guibg=NONE gui=undercurl " ----------------------------------------------------------------------------- hi VimError guifg=#b6b6b6 guibg=#313131 gui=bold hi VimCommentTitle guifg=#5c5c5c guibg=bg gui=bold,italic hi qfFileName guifg=#6a6a6a guibg=NONE gui=italic hi qfLineNr guifg=fg guibg=NONE gui=NONE hi qfError guifg=fg guibg=#c4c2c2 gui=undercurl " ----------------------------------------------------------------------------- hi pythonDecorator guifg=#3b3b3b guibg=NONE gui=bold hi link pythonDecoratorFunction pythonDecorator " ----------------------------------------------------------------------------- hi htmlLink guifg=#666666 guibg=NONE gui=underline,italic if exists('g:zenesque_colors') && g:zenesque_colors==1 " light scheme with colors hi Normal guifg=#0b092c guibg=#e5e5d8 gui=NONE hi CursorLine guifg=NONE guibg=#d4d4c0 gui=NONE hi CursorColumn guifg=NONE guibg=#d4d4c0 gui=NONE hi LineNr guifg=#888875 guibg=NONE gui=NONE hi Constant guifg=#73221A guibg=NONE gui=NONE hi String guifg=#073010 guibg=NONE gui=NONE hi Function guifg=#3b1c5b guibg=NONE gui=bold hi Statement guifg=#100051 guibg=NONE gui=italic hi Conditional guifg=#6e220e guibg=NONE gui=NONE hi Type guifg=#421b4d guibg=NONE gui=italic hi Todo guifg=#6c0303 guibg=NONE gui=NONE hi Comment guifg=#6e6e6e guibg=NONE gui=italic hi PmenuSel guifg=fg guibg=#c37a23 gui=bold hi ColorColumn guifg=NONE guibg=#e6e6e6 hi Cursor guifg=bg guibg=fg gui=NONE hi CursorIM guifg=bg guibg=fg gui=NONE hi lCursor guifg=bg guibg=fg gui=NONE hi diffAdd guifg=bg guibg=#5a7e5d gui=none hi diffDelete guifg=#bf6a6a guibg=#3d2424 gui=none hi diffChange guifg=bg guibg=#b55c5c gui=none hi diffText guifg=bg guibg=#264928 gui=none hi Directory guifg=#525252 guibg=bg gui=NONE hi ErrorMsg guifg=#6f6f6f guibg=NONE gui=NONE hi FoldColumn guifg=#555555 guibg=#cccbcb gui=bold hi Folded guifg=#555555 guibg=#cccccc gui=italic hi IncSearch guifg=#000000 guibg=#adadad gui=NONE hi Search guifg=#000000 guibg=#c5c3c3 gui=NONE hi MatchParen guifg=#000000 guibg=#a8a8a8 gui=bold hi ModeMsg guifg=#ffffff guibg=#767676 gui=bold hi MoreMsg guifg=#7c7c7c guibg=bg gui=bold hi NonText guifg=#7e7e7e guibg=bg gui=bold hi Pmenu guifg=#646564 guibg=#b1b2b1 gui=reverse hi PmenuSbar guifg=#ffffff guibg=#989898 gui=NONE hi PmenuThumb guifg=#ffffff guibg=#777777 gui=NONE hi Question guifg=#454545 guibg=bg gui=bold hi SignColumn guifg=#ffffff guibg=#696969 gui=NONE hi SpecialKey guifg=#ffffff guibg=#696969 gui=NONE hi SpellBad guisp=#323232 guibg=#d1cdcd gui=undercurl hi SpellCap guisp=#5d5d5d gui=undercurl hi SpellLocal guisp=#434343 gui=undercurl hi SpellRare guisp=#7d7d7d gui=undercurl hi StatusLine guifg=fg guibg=#c0bebe gui=bold hi StatusLineNC guifg=#808080 guibg=#c5c5af gui=italic hi TabLine guifg=fg guibg=#898a8b gui=underline hi TabLineFill guifg=fg guibg=bg gui=reverse hi TabLineSel guifg=fg guibg=bg gui=bold hi Title guifg=#6d6d6d guibg=bg gui=bold hi VertSplit guifg=#c5c5af guibg=#c5c5af hi Visual guifg=#ffffff guibg=#9a9a9a gui=NONE hi WarningMsg guifg=#cfcfcf guibg=#5b5b5b gui=NONE hi WildMenu guifg=#000000 guibg=#c2c2c2 gui=NONE hi Boolean guifg=#616060 guibg=NONE gui=bold hi Identifier guifg=#141414 guibg=NONE gui=bold hi Keyword guifg=#666666 guibg=NONE gui=underline hi PreProc guifg=#272c61 guibg=NONE gui=NONE hi Special guifg=#6e6e6e guibg=NONE gui=NONE hi Ignore guifg=bg guibg=NONE gui=NONE hi Error guifg=#727272 guibg=NONE gui=undercurl " ----------------------------------------------------------------------------- hi VimError guifg=#b6b6b6 guibg=#313131 gui=bold hi VimCommentTitle guifg=#5c5c5c guibg=bg gui=bold,italic hi qfFileName guifg=#6a6a6a guibg=NONE gui=italic hi qfLineNr guifg=fg guibg=NONE gui=NONE hi qfError guifg=fg guibg=#c4c2c2 gui=undercurl " ----------------------------------------------------------------------------- hi pythonDecorator guifg=#3b3b3b guibg=NONE gui=bold hi link pythonDecoratorFunction pythonDecorator " ----------------------------------------------------------------------------- hi htmlLink guifg=#666666 guibg=NONE gui=underline,italic elseif exists('g:zenesque_colors') && g:zenesque_colors==2 " dark scheme without colors set background=dark hi Normal guifg=#adadad guibg=#1a1a1a gui=NONE hi CursorLine guifg=NONE guibg=#000000 gui=NONE hi CursorColumn guifg=NONE guibg=#000000 gui=NONE hi LineNr guifg=#555555 guibg=NONE gui=NONE hi Constant guifg=#848484 guibg=NONE gui=bold hi Statement guifg=#a6a6a6 guibg=NONE gui=italic hi Function guifg=#919191 guibg=NONE gui=bold hi String guifg=#838383 guibg=NONE gui=italic hi Type guifg=#838383 guibg=NONE gui=bold,italic hi Conditional guifg=#787878 guibg=NONE gui=bold hi Todo guifg=#ffffff guibg=NONE gui=underline hi Comment guifg=#555555 guibg=NONE gui=NONE hi PmenuSel guifg=#000000 guibg=#a9a9aa gui=bold hi Special guifg=#868585 guibg=NONE gui=NONE hi Identifier guifg=#626262 guibg=NONE gui=bold hi Keyword guifg=#858585 guibg=NONE gui=underline hi PreProc guifg=#6b6b6b guibg=NONE gui=italic hi Visual guifg=NONE guibg=#313131 gui=NONE hi ColorColumn guifg=NONE guibg=#e6e6e6 hi Cursor guifg=bg guibg=fg gui=NONE hi CursorIM guifg=bg guibg=fg gui=NONE hi lCursor guifg=bg guibg=fg gui=NONE hi DiffAdd guifg=fg guibg=#444444 gui=NONE hi DiffChange guifg=bg guibg=#909090 gui=NONE hi DiffDelete guifg=NONE guibg=#292929 gui=NONE hi DiffText guifg=NONE guibg=#383838 gui=NONE hi Directory guifg=#525252 guibg=bg gui=NONE hi ErrorMsg guifg=#6f6f6f guibg=NONE gui=NONE hi FoldColumn guifg=#555555 guibg=#414141 gui=bold hi Folded guifg=#828282 guibg=#212121 gui=italic hi IncSearch guifg=#000000 guibg=#adadad gui=NONE hi Search guifg=#000000 guibg=#c5c3c3 gui=NONE hi MatchParen guifg=#000000 guibg=#a8a8a8 gui=bold hi ModeMsg guifg=#ffffff guibg=#767676 gui=bold hi MoreMsg guifg=#7c7c7c guibg=bg gui=bold hi NonText guifg=#7e7e7e guibg=bg gui=bold hi Pmenu guifg=#656565 guibg=#3f3f3f gui=NONE hi PmenuSbar guifg=fg guibg=#5d5d5d gui=NONE hi PmenuThumb guifg=fg guibg=#777777 gui=NONE hi Question guifg=#454545 guibg=bg gui=bold hi SignColumn guifg=#ffffff guibg=#696969 gui=NONE hi SpecialKey guifg=#ffffff guibg=#696969 gui=NONE hi SpellBad guisp=#ffffff guibg=#000000 gui=undercurl hi SpellCap guisp=#5d5d5d gui=undercurl hi SpellLocal guisp=#434343 gui=undercurl hi SpellRare guisp=#7d7d7d gui=undercurl hi StatusLine guifg=#000000 guibg=#727272 gui=bold hi StatusLineNC guifg=#5a5959 guibg=#222222 gui=italic hi TabLine guifg=fg guibg=#757575 gui=underline hi TabLineFill guifg=fg guibg=bg gui=reverse hi TabLineSel guifg=fg guibg=bg gui=bold hi Title guifg=#6d6d6d guibg=bg gui=bold hi VertSplit guifg=#222222 guibg=#222222 hi WarningMsg guifg=#cfcfcf guibg=#5b5b5b gui=NONE hi WildMenu guifg=#000000 guibg=#828282 gui=NONE hi Boolean guifg=#616060 guibg=NONE gui=bold hi Ignore guifg=bg guibg=NONE gui=NONE hi Error guifg=#727272 guibg=NONE gui=undercurl " ----------------------------------------------------------------------------- hi VimError guifg=#b6b6b6 guibg=#313131 gui=bold hi VimCommentTitle guifg=#5c5c5c guibg=bg gui=bold,italic hi qfFileName guifg=#6a6a6a guibg=NONE gui=italic hi qfLineNr guifg=fg guibg=NONE gui=NONE hi qfError guifg=fg guibg=#000000 gui=undercurl " ----------------------------------------------------------------------------- hi pythonDecorator guifg=#3b3b3b guibg=NONE gui=bold hi link pythonDecoratorFunction pythonDecorator " ----------------------------------------------------------------------------- hi htmlLink guifg=#666666 guibg=NONE gui=underline,italic elseif exists('g:zenesque_colors') && g:zenesque_colors==3 " dark scheme with colors set background=dark hi Normal guifg=#adadad guibg=#0f1216 gui=NONE hi CursorLine guifg=NONE guibg=#000000 gui=NONE hi CursorColumn guifg=NONE guibg=#000000 gui=NONE hi LineNr guifg=#4d4d44 guibg=NONE gui=NONE hi Constant guifg=#8d5c57 guibg=NONE gui=NONE hi String guifg=#5d7a64 guibg=NONE gui=NONE hi Function guifg=#9784a2 guibg=NONE gui=NONE hi Statement guifg=#5a89a4 guibg=NONE gui=italic hi Conditional guifg=#8c7867 guibg=NONE gui=NONE hi Type guifg=#518991 guibg=NONE gui=italic hi Todo guifg=#9b3535 guibg=NONE gui=NONE hi Comment guifg=#777777 guibg=NONE gui=NONE hi PmenuSel guifg=bg guibg=#9b601a gui=bold hi Special guifg=#a7a863 guibg=NONE gui=NONE hi Identifier guifg=#a16f51 guibg=NONE gui=NONE hi Keyword guifg=#737354 guibg=NONE gui=underline hi PreProc guifg=#5567a1 guibg=NONE gui=NONE hi Visual guifg=NONE guibg=#462e44 gui=NONE hi ColorColumn guifg=NONE guibg=#e6e6e6 hi Cursor guifg=bg guibg=fg gui=NONE hi CursorIM guifg=bg guibg=fg gui=NONE hi lCursor guifg=bg guibg=fg gui=NONE hi diffAdd guifg=bg guibg=#5a7e5d gui=none hi diffDelete guifg=#bf6a6a guibg=#2d1212 gui=none hi diffChange guifg=bg guibg=#7e4444 gui=none hi diffText guifg=bg guibg=#345535 gui=none hi Directory guifg=#525252 guibg=bg gui=NONE hi ErrorMsg guifg=#6f6f6f guibg=NONE gui=NONE hi FoldColumn guifg=#555555 guibg=#414141 gui=bold hi Folded guifg=#828282 guibg=#212121 gui=italic hi IncSearch guifg=#000000 guibg=#adadad gui=NONE hi Search guifg=#000000 guibg=#c5c3c3 gui=NONE hi MatchParen guifg=#000000 guibg=#a8a8a8 gui=bold hi ModeMsg guifg=#ffffff guibg=#767676 gui=bold hi MoreMsg guifg=#7c7c7c guibg=bg gui=bold hi NonText guifg=#7e7e7e guibg=bg gui=bold hi Pmenu guifg=#656565 guibg=#3f3f3f gui=NONE hi PmenuSbar guifg=fg guibg=#5d5d5d gui=NONE hi PmenuThumb guifg=fg guibg=#777777 gui=NONE hi Question guifg=#454545 guibg=bg gui=bold hi SignColumn guifg=#ffffff guibg=#696969 gui=NONE hi SpecialKey guifg=#ffffff guibg=#696969 gui=NONE hi SpellBad guisp=#ffffff guibg=#000000 gui=undercurl hi SpellCap guisp=#5d5d5d gui=undercurl hi SpellLocal guisp=#434343 gui=undercurl hi SpellRare guisp=#7d7d7d gui=undercurl hi StatusLine guifg=#000000 guibg=#727272 gui=bold hi StatusLineNC guifg=#5a5959 guibg=#222222 gui=italic hi TabLine guifg=fg guibg=#5f5f5f gui=underline hi TabLineFill guifg=fg guibg=bg gui=reverse hi TabLineSel guifg=fg guibg=bg gui=bold hi Title guifg=#6d6d6d guibg=bg gui=bold hi VertSplit guifg=#222222 guibg=#222222 hi WarningMsg guifg=#cfcfcf guibg=#5b5b5b gui=NONE hi WildMenu guifg=#000000 guibg=#828282 gui=NONE hi Boolean guifg=#616060 guibg=NONE gui=bold hi Ignore guifg=bg guibg=NONE gui=NONE hi Error guifg=#727272 guibg=NONE gui=undercurl " ----------------------------------------------------------------------------- hi VimError guifg=#b6b6b6 guibg=#313131 gui=bold hi VimCommentTitle guifg=#5c5c5c guibg=bg gui=bold,italic hi qfFileName guifg=#6a6a6a guibg=NONE gui=italic hi qfLineNr guifg=fg guibg=NONE gui=NONE hi qfError guifg=fg guibg=#000000 gui=undercurl " ----------------------------------------------------------------------------- hi pythonDecorator guifg=#3b3b3b guibg=NONE gui=bold hi link pythonDecoratorFunction pythonDecorator " ----------------------------------------------------------------------------- hi htmlLink guifg=#666666 guibg=NONE gui=underline,italic endif hi htmlTagName guifg=NONE guibg=NONE gui=NONE hi link htmlScriptTag htmlTagName hi link htmlTagN htmlTagName hi link htmlEndTag htmlTagName hi link htmlSpecialTagName htmlTagName hi link cssRenderAttr Constant hi link cssTextAttr Constant hi link cssUIAttr Constant hi link cssTableAttr Constant hi link cssColorAttr Constant hi link cssBoxAttr Constant hi link cssCommonAttr Constant hi link cssFunctionName Constant hi link cssRenderProp Type hi link cssBoxProp cssRenderProp hi link cssTagName Statement hi link cssClassName cssTagName hi link cssIdentifier cssTagName hi link cssPseudoClass cssTagName hi link cssPseudoClassId cssTagName hi cssBraces guifg=fg guibg=bg gui=NONE hi javaScript guifg=fg guibg=NONE hi link javaScriptFunction Statement hi link javaScriptMember Statement hi link javaScriptValue Constant hi link objcClass Type hi link cocoaClass objcClass hi link objcSubclass objcClass hi link objcSuperclass objcClass hi link cocoaFunction Function hi link objcMethodName Identifier hi link objcMethodArg Normal hi link objcMessageName Identifier hi link javaType Statement hi link cppStatement Statement ================================================ FILE: .vim/etc/lazy.toml ================================================ [[plugins]] repo = 'groenewege/vim-less' on_ft = ['less'] [[plugins]] repo = 'hail2u/vim-css3-syntax' on_ft = ['css'] [[plugins]] repo = 'hallison/vim-markdown' on_ft = ['markdown'] [[plugins]] repo = 'motemen/hatena-vim' on_ft = ['hatena'] [[plugins]] repo = 'othree/html5.vim' on_ft = ['html'] [[plugins]] repo = 'pangloss/vim-javascript' on_ft = ['typescript', 'javascript'] [[plugins]] repo = 'MaxMEllon/vim-jsx-pretty' on_ft = ['javascript'] [[plugins]] repo = 'vim-perl/vim-perl' on_ft = ['perl'] hook_add = ''' let g:perl_fold = 0 ''' [[plugins]] repo = 'vim-ruby/vim-ruby' on_ft = ['ruby'] [[plugins]] repo = 'davidoc/taskpaper.vim' on_ft = ['taskpaper'] [[plugins]] repo = 'motemen/tap-vim' on_ft = ['perl'] hook_add = ''' let g:tap#use_vimproc = 1 ''' [[plugins]] repo = 'eagletmt/ghcmod-vim' external_commands = 'ghc-mod' on_ft = ['haskell'] [[plugins]] repo = 'eagletmt/ghci-vim' external_commands = ['ghc'] on_ft = ['haskell'] [[plugins]] repo = 'eagletmt/neco-ghc' on_ft = ['haskell'] external_commands = ['ghc', 'ghc-mod'] [[plugins]] repo = 'itchyny/vim-haskell-indent' on_ft = ['haskell'] [[plugins]] repo = 'ekalinin/Dockerfile.vim' on_ft = 'dockerfile' [[plugins]] repo = 'leafgarland/typescript-vim' on_ft = ['typescript'] [[plugins]] repo = 'Quramy/tsuquyomi' on_ft = ['typescript'] [[plugins]] repo = 'keith/swift.vim' on_ft = ['swift'] [[plugins]] repo = 'derekwyatt/vim-scala' on_ft = ['scala'] [[plugins]] repo = 'mattn/emmet-vim' on_ft = ['html', 'haml', 'slim', 'css', 'tt2html'] hook_add = ''' let g:user_emmet_leader_key = '' ''' [[plugins]] repo = 'vim-scripts/sudo.vim' on_cmd = ['SudoWrite', 'SudoRead'] [[plugins]] repo = 'haya14busa/incsearch.vim' on_map = [''] hook_add = ''' let g:incsearch#auto_nohlsearch = 1 map / (incsearch-forward) map ? (incsearch-backward) map g/ (incsearch-stay) map n (incsearch-nohl-n) map N (incsearch-nohl-N) nmap n (incsearch-nohl)(anzu-n-with-echo) nmap N (incsearch-nohl)(anzu-N-with-echo) ''' [[plugins]] repo = 'h1mesuke/vim-alignta' on_cmd = ['Alignta'] hook_add = ''' vmap ,a :Alignta vmap ,= :Alignta = vmap ,> :Alignta => ''' [[plugins]] repo = 'cespare/vim-toml' on_ft = ['toml'] [[plugins]] repo = 'motemen/xslate-vim' on_ft = ['xslate'] [[plugins]] repo = 'Shougo/neomru.vim' if = '!has("nvim")' on_unite = ['file_mru'] hook_source = ''' call unite#custom#source( \ 'file_mru', 'matchers', \ ['matcher_project_files', 'matcher_fuzzy'], \ ) ''' [[plugins]] repo = 'subosito/nginx.vim' on_ft = ['nginx'] [[plugins]] repo = 'fatih/vim-go' on_ft = ['go'] [[plugins]] repo = 'flowtype/vim-flow' on_ft = ['javascript'] hook_add = ''' let g:flow#autoclose = 1 ''' ================================================ FILE: .vim/etc/operator.toml ================================================ [[plugins]] repo = 'rhysd/vim-operator-surround' on_map = ['(operator-surround-'] depends = ['vim-operator-user'] hook_add = ''' map sa (operator-surround-append) map sd (operator-surround-delete) map sr (operator-surround-replace) ''' [[plugins]] repo = 'haya14busa/vim-operator-flashy' on_map = ['(operator-flashy'] depends = ['vim-operator-user'] hook_add = ''' map y (operator-flashy) nmap Y (operator-flashy)$ ''' [[plugins]] repo = 'emonkak/vim-operator-comment' on_map = ['(operator-comment)', '(operator-uncomment)'] ================================================ FILE: .vim/etc/plugins.toml ================================================ [[plugins]] repo = 'thinca/vim-quickrun' hook_source = ''' runtime rc/plugins/quickrun.vim ''' [[plugins]] repo = 'kana/vim-textobj-user' [[plugins]] repo = 'kana/vim-textobj-indent' depends = ['kana/vim-textobj-user'] [[plugins]] repo = 'kana/vim-textobj-line' depends = ['kana/vim-textobj-user'] [[plugins]] repo = 'vim-jp/vimdoc-ja' if = '!has("nvim")' [[plugins]] repo = 'Shougo/unite.vim' if = '!has("nvim")' hook_add = ''' runtime rc/plugins/unite.added.vim ''' [[plugins]] repo = 'Shougo/neocomplete.vim' vim_version = '7.3.885' if = '!has("nvim")' disabled = '!has("lua")' hook_add = ''' let g:neocomplete#enable_at_startup = 1 let g:neocomplete#data_directory = $VIM_CACHE_DIR . '/neocomplete' ''' hook_source = ''' runtime rc/plugins/neocomplete.vim ''' [[plugins]] repo = 'Shougo/deoplete.nvim' if = 'has("nvim")' hook_add = ''' let g:deoplete#enable_at_startup = 1 ''' [[plugins]] repo = 'LeafCage/foldCC' hook_source = ''' set foldtext=FoldCCtext() set foldcolumn=4 ''' [[plugins]] repo = 'tyru/current-func-info.vim' [[plugins]] repo = 'Yggdroot/indentLine' hook_source = ''' let g:indentLine_char = '|' let g:indentLine_showFirstIndentLevel = 1 autocmd MyInit BufEnter \* :IndentLinesReset ''' [[plugins]] repo = 'itchyny/lightline.vim' hook_add = ''' runtime rc/plugins/lightline.vim ''' [[plugins]] repo = 'osyo-manga/vim-anzu' hook_add = ''' nmap n (anzu-n-with-echo) nmap N (anzu-N-with-echo) nmap * (anzu-star-with-echo) nmap # (anzu-sharp-with-echo) nmap (anzu-clear-search-status) ''' [[plugins]] repo = 'Shougo/neosnippet' hook_add = ''' let g:neosnippet#disable_select_mode_mappings = 0 let g:neosnippet#snippets_directory = '~/.vim/snippets' imap neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : pumvisible() ? "\" : "\" smap neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : "\" ''' [[plugins]] repo = 'kana/vim-smartinput' hook_add = ''' call smartinput#map_to_trigger('i', '(smartinput_BS)', '', '') call smartinput#map_to_trigger('i', '(smartinput_C-h)', '', '') call smartinput#map_to_trigger('i', '(smartinput_CR)', '', '') call smartinput#define_rule({ \ 'at' : '\s\+\%#', \ 'char' : '', \ 'input' : ":call setline('.', substitute(getline('.'), '\\s\\+$', '', ''))", \ }) call smartinput#define_rule({ \ 'at' : '\%#', \ 'char' : '[', \ 'input' : '[%%]', \ 'filetype': ['tt2html'], \ }) ''' [[plugins]] repo = 'kana/vim-smartchr' hook_add = ''' inoremap = smartchr#loop(' = ', ' == ', '=') ''' [[plugins]] repo = 'sickill/vim-pasta' [[plugins]] repo = 'Shougo/neosnippet-snippets' [[plugins]] repo = 'Shougo/vimproc' build = 'make -f make_mac.mak' [[plugins]] repo = 'editorconfig/editorconfig-vim' [[plugins]] repo = 'thinca/vim-localrc' [[plugins]] repo = 'Shougo/dein.vim' [[plugins]] repo = 'tpope/vim-fugitive' hook_add = ''' nnoremap [fugitive] nmap ,g [fugitive] nnoremap [fugitive]s :Gstatus nnoremap [fugitive]c :Gcommit nnoremap [fugitive]C :Gcommit --amend nnoremap [fugitive]b :Gblame nnoremap [fugitive]a :Gwrite nnoremap [fugitive]d :Gdiff nnoremap [fugitive]D :Gdiff --staged vmap ,go :Gbrowse autocmd MyInit BufReadPost fugitive://* set bufhidden=delete ''' [[plugins]] repo = 'tyru/eskk.vim' hook_add = ''' imap (eskk:toggle) let g:eskk#directory = expand('~/.vim/.eskk') let user_dictionary = expand('~/Library/Application Support/AquaSKK/skk-jisyo.utf8') let large_dictionary = expand('~/Library/Application Support/AquaSKK/SKK-JISYO.L') if filereadable(user_dictionary) let g:eskk#dictionary = user_dictionary endif if filereadable(large_dictionary) let g:eskk#large_dictionary = large_dictionary endif ''' [[plugins]] repo = 'toupeira/vim-desertink' [[plugins]] repo = 'KeitaNakamura/neodark.vim' [[plugins]] repo = 'crusoexia/vim-monokai' [[plugins]] repo = 'roosta/vim-srcery' [[plugins]] repo = 'altercation/vim-colors-solarized' if = '!has("nvim")' [[plugins]] repo = 'lifepillar/vim-solarized8' if = 'has("nvim")' [[plugins]] repo = 'nanotech/jellybeans.vim' [[plugins]] repo = 'hail2u/h2u_colorscheme' [[plugins]] repo = 'ajh17/Spacegray.vim' [[plugins]] repo = 'jdkanani/vim-material-theme' [[plugins]] repo = 'morhetz/gruvbox' [[plugins]] repo = 'Shougo/tabpagebuffer.vim' [[plugins]] repo = 'Shougo/unite-outline' [[plugins]] repo = 'thinca/vim-unite-history' [[plugins]] repo = 'sorah/unite-ghq' [[plugins]] repo = 'ujihisa/unite-colorscheme' [[plugins]] repo = 'kana/vim-operator-user' [[plugins]] repo = 'tpope/vim-rhubarb' [[plugins]] repo = 'w0rp/ale' hook_add = ''' let g:ale_sign_error = 'E' let g:ale_sign_warning = 'W' let g:ale_statusline_format = ['E%d', 'W%d', ''] let g:ale_lint_on_enter = 0 let g:ale_lint_on_text_changed = 'never' let g:ale_set_loclist = 1 let g:ale_set_quickfix = 1 let g:ale_open_list = 1 let g:ale_keep_list_window_open = 0 let g:ale_javascript_eslint_options = '--quiet' let g:ale_linters = { 'javascript': ['eslint', 'flow'] } let g:ale_perl_perl_executable = 'env PERL5LIB="./local/lib/perl5" perl' ''' [[plugins]] repo = 'Shougo/denite.nvim' if = 'has("nvim")' on_cmd = 'Denite' hook_add = 'runtime rc/plugins/denite.added.vim' hook_source = 'runtime rc/plugins/denite.sourced.vim' [[plugins]] repo = 'aereal/vim-colors-japanesque' ================================================ FILE: .vim/filetype.vim ================================================ autocmd BufEnter */templates/*.html setf tt2html autocmd BufEnter *.tt setf tt2html autocmd BufEnter *.es6,*.es setf javascript autocmd BufEnter */nginx/*.conf setf nginx autocmd BufEnter */*.nginx.conf setf nginx autocmd BufEnter cpanfile setf cpanfile autocmd BufEnter cpanfile set syntax=perl.cpanfile autocmd BufEnter *.t setf perl autocmd BufEnter *.psgi setf perl autocmd BufEnter *.podspec setf ruby autocmd BufEnter Podfile setf ruby autocmd BufEnter *.hatena setf hatena autocmd BufEnter *.scala setf scala autocmd BufEnter *.toml setf toml ================================================ FILE: .vim/gvimrc ================================================ let g:macvim_skip_cmd_opt_movement = 1 set bg=dark if has("gui_running") try colorscheme japanesque catch colorscheme desert endtry set guifontwide=SourceHanCodeJP-Regular:h14 set guifont=FiraMono-Regular:h14 set tranparency=15 endif ================================================ FILE: .vim/plugin/memolist-templates/hatena.txt ================================================ * {{_title_}} ================================================ FILE: .vim/rc/00_autocmd.vim ================================================ augroup MyInit autocmd! augroup END " screen title {{{ if ! has('gui_running') autocmd MyInit BufEnter * if bufname("") !~ "^\[A-Za-z0-9\]://" | silent! exe '!echo -n "k%:t\\"' | endif endif " }}} " Markdown {{{ autocmd MyInit FileType markdown setlocal et ts=4 sts=4 sw=4 " }}} " Close window with `q` key {{{ autocmd MyInit FileType help,ref-*,tap-result nnoremap q :q " }}} " Git config {{{ autocmd MyInit FileType gitconfig setlocal noexpandtab " }}} " function! ReloadConfig() abort " call dein#clear_state() " source $MYVIMRC " if has('gui_running') " source $MYGVIMRC " endif " endfunction " autocmd MyInit BufWritePost *vimrc,*gvimrc,*/rc/*.vim call ReloadConfig() function! LooksLikePerlProject(project_root) abort let cpanfile = a:project_root . '/cpanfile' if filereadable(cpanfile) return 1 else return 0 endif endfunction function! ConfigureCartonPath() abort let project_root = getcwd() let is_perl = LooksLikePerlProject(project_root) let t:is_perl_project = is_perl let w:is_perl_project = is_perl if is_perl let paths = [ \ project_root . '/lib', \ project_root . '/local/lib/perl5', \ project_root . '/templates', \ ] execute "setlocal path+=" . join(paths, ',') endif endfunction autocmd MyInit BufEnter,TabEnter * call ConfigureCartonPath() function! SetupCustomHighlightLinks() abort highlight! link Noise Conceal " Perl highlight! link perlVarPlain Identifier highlight! link perlVarPlain2 Identifier highlight! link perlStatementStorage StorageClass highlight! link perlSharpBang Comment highlight! link perlStringStartEnd Conceal highlight! link perlMatchStartEnd Conceal highlight! link perlFunction Statement highlight! link perlSubName Function highlight! link perlOperator Operator highlight! link perlMethod Function highlight! link perlStatementInclude Include " JavaScript highlight! link jsObjectKey Type highlight! link jsFuncCall Function " HTML highlight! link htmlTag Conceal highlight! link htmlEndTag Conceal highlight! link htmlTagName Identifier " TT2 highlight! link tt2_tag Conceal highlight! link tt2_bracket_r Conceal highlight! link tt2_operator Conceal " TypeScript highlight! link typescriptEndColons Conceal highlight! link typescriptParens Conceal highlight! link typescriptBraces Conceal " Git highlight! link gitcommitWarning WarningMsg " Fugitive highlight! link FugitiveblameDelimiter Delimiter " Ruby highlight! link rubyStringDelimiter Conceal " Vim highlight! link vimParenSep Conceal " Markdown highlight! link mkdDelimiter Statement " YAML highlight! link yamlKeyValueDelimiter Statement highlight! link SignColumn LineNr endfunction autocmd MyInit ColorScheme * call SetupCustomHighlightLinks() " vim:set foldmethod=marker: ================================================ FILE: .vim/rc/00_base.vim ================================================ set hidden set history=1000 set autoread set fileformats=unix,dos,mac set scrolloff=100000 " 常にカーソルのある行を中心に (したい) set backspace=indent,eol,start set formatoptions-=ro set ttyfast " set lazyredraw set completeopt=menuone,menu " Cache directory {{{ if !exists('$VIM_CACHE_DIR') if isdirectory(expand($TMPDIR)) let tmp_dir = expand($TMPDIR) else let tmp_dir = '/tmp' endif let path_separator = '/' let path_cmps = split(simplify(tmp_dir), path_separator, 1) let $VIM_CACHE_DIR = simplify(join(extend(path_cmps, ['vim']), path_separator)) unlet tmp_dir path_separator path_cmps endif if !isdirectory(expand($VIM_CACHE_DIR)) call mkdir($VIM_CACHE_DIR, 'p') endif " }}} " Backup & Swap {{{ set nobackup set swapfile set directory=~/.vim/swp " }}} " Indentation {{{ set autoindent set nosmartindent set nocindent set smarttab set shiftwidth=2 set tabstop=2 set softtabstop=2 set expandtab set shiftround " }}} " Encoding {{{ set fileencodings=utf-8,iso-2022-jp,euc-jp,cp932,ucs-bom,default,latin1 set encoding=utf-8 set termencoding=utf-8 " }}} " Search {{{ set ignorecase set smartcase set hlsearch set incsearch set wrapscan " }}} " Visualization {{{ set ambiwidth=double set list set listchars=tab:»\ ,precedes:<,extends:>,trail:_,eol:↲ " }}} " UI {{{ set langmenu=none " メニューをローカライズしない set laststatus=2 set number set ruler set modeline set noshowcmd set noshowmode set shortmess+=I if v:version >= 704 " set relativenumber " 7.4 以降だと絶対行数も表示される endif " }}} " IME {{{ set noimdisable set iminsert=0 imsearch=0 set noimcmdline " }}} " Persistent Undo {{{ if has('persistent_undo') set undodir=~/.vim/undo set undofile endif " }}} " Clipboard Integration {{{ if has('clipboard') if has('nvim') set clipboard+=unnamedplus else set clipboard=unnamed,autoselect endif endif " }}} " fish-shell fix {{{ if $SHELL =~# 'fish$' if executable('zsh') set shell=zsh else set shell=sh endif endif " }}} if has('gui_running') set guioptions& set guioptions-=T set guioptions-=m set guioptions-=r set guioptions-=R set guioptions-=l set guioptions-=l set guioptions-=L set guioptions-=L set guioptions-=b set guioptions-=e endif " vim:set foldmethod=marker: ================================================ FILE: .vim/rc/10_dein.vim ================================================ set runtimepath& runtimepath^=~/devel/src/github.com/Shougo/dein.vim let s:dein_cache_dir = expand('~/.vim/cache/dein') let s:plugins_toml = expand('~/.vim/etc/plugins.toml') let s:lazy_plugins_toml = expand('~/.vim/etc/lazy.toml') let s:operator_plugins_toml = expand('~/.vim/etc/operator.toml') if dein#load_state(s:dein_cache_dir) call dein#begin(s:dein_cache_dir, [ \ expand(''), \ s:plugins_toml, \ s:lazy_plugins_toml, \ s:operator_plugins_toml, \ ]) call dein#load_toml(s:plugins_toml) call dein#load_toml(s:lazy_plugins_toml, { 'lazy': 1 }) call dein#load_toml(s:operator_plugins_toml, { 'lazy': 1, 'depends': ['vim-operator-user'] }) call dein#local('~/devel/src/github.com/aereal', { \ 'frozen': 1, \ 'merged': 1, \ }, ['vim-*']) call dein#end() call dein#save_state() endif if dein#check_install() call dein#install() endif unlet s:dein_cache_dir ================================================ FILE: .vim/rc/20_command.vim ================================================ command! Sketch call s:sketch() " {{{ function! s:sketch() " {{{ if !exists('g:sketch_dir') let g:sketch_dir = expand('~/sketches') endif if !isdirectory(g:sketch_dir) call mkdir(g:sketch_dir, 'p') endif let basename = strftime('%Y%m%d%H%M%S') let filename = g:sketch_dir . '/' . basename execute ':edit ' . filename endfunction " }}} " }}} command! Prove call s:prove() function! s:prove() let func_name = cfi#format('%s', '') if func_name != '' let $TEST_METHOD = func_name endif call tap#prove() endfunction " }}} command! Memo call s:memo() function! s:memo() let memo_root = expand('~/memo') let dt = strftime('%Y%m%d-%H%M%S') let suffix = '.md' let filename = memo_root . '/' . dt . suffix execute ":edit " . filename endfunction function! s:get_syn_id(transparent) let synid = synID(line("."), col("."), 1) if a:transparent return synIDtrans(synid) else return synid endif endfunction function! s:get_syn_attr(synid) let name = synIDattr(a:synid, "name") let ctermfg = synIDattr(a:synid, "fg", "cterm") let ctermbg = synIDattr(a:synid, "bg", "cterm") let guifg = synIDattr(a:synid, "fg", "gui") let guibg = synIDattr(a:synid, "bg", "gui") return { \ "name": name, \ "ctermfg": ctermfg, \ "ctermbg": ctermbg, \ "guifg": guifg, \ "guibg": guibg} endfunction function! s:get_syn_info() let baseSyn = s:get_syn_attr(s:get_syn_id(0)) echo "name: " . baseSyn.name . \ " ctermfg: " . baseSyn.ctermfg . \ " ctermbg: " . baseSyn.ctermbg . \ " guifg: " . baseSyn.guifg . \ " guibg: " . baseSyn.guibg let linkedSyn = s:get_syn_attr(s:get_syn_id(1)) echo "link to" echo "name: " . linkedSyn.name . \ " ctermfg: " . linkedSyn.ctermfg . \ " ctermbg: " . linkedSyn.ctermbg . \ " guifg: " . linkedSyn.guifg . \ " guibg: " . linkedSyn.guibg endfunction command! SyntaxInfo call s:get_syn_info() ================================================ FILE: .vim/rc/20_key.vim ================================================ let mapleader = ';' let g:mapleader = ';' nnoremap j gj nnoremap k gk nnoremap Y y$ nnoremap :update nnoremap :nohlsearch nnoremap Q nnoremap ZQ nnoremap ZZ nnoremap ) % nnoremap ( % nnoremap H ^ nnoremap L $ nnoremap ]q :cnext nnoremap [q :cprev xnoremap < >gv ================================================ FILE: .vim/rc/20_tab.vim ================================================ set showtabline=2 ================================================ FILE: .vim/rc/command_line_window.vim ================================================ nnoremap (command-line-enter) q: xnoremap (command-line-enter) q: nnoremap (command-line-norange) q: nmap : (command-line-enter) xmap : (command-line-enter) autocmd MyInit CmdwinEnter * call s:init_cmdwin() function! s:init_cmdwin() " {{{ nnoremap q :quit nnoremap :quit inoremap pumvisible() ? "\\" : "\" inoremap pumvisible() ? "\\" : "\" inoremap pumvisible() ? "\\" : "\" inoremap pumvisible() ? "\" : "\" startinsert! endfunction " }}} ================================================ FILE: .vim/rc/plugins/denite.added.vim ================================================ nnoremap [denite] nmap gj [denite] nmap [denite]p (project-files) nmap [denite]f (files) nmap [denite]F (files-from-buffer) nmap [denite][ (outline) nmap [denite]b (buffers) nnoremap (project-files) :Denite file/rec -buffer-name=files -source-names=hide nnoremap (files) :DeniteProjectDir file file:new -buffer-name=files -source-names=hide nnoremap (files-from-buffer) :DeniteBufferDir file file:new -buffer-name=files -source-names=hide nnoremap (buffers) :Denite buffer nnoremap (outline) :Denite outline ================================================ FILE: .vim/rc/plugins/denite.sourced.vim ================================================ call denite#custom#option('default', 'prompt', '>') call denite#custom#option('files', 'prompt', '>') if executable('rg') call denite#custom#var('file_rec', 'command', ['rg', '--files', '--glob', '!.git', '--glob', '!*.{png,jpg,min.js,gif,svg,woff,woff2,eot,ttf,otf,ico}']) call denite#custom#var('grep', 'command', 'rg') endif call denite#custom#map('normal', 'h', '', 'noremap') call denite#custom#map('normal', 'l', '', 'noremap') call denite#custom#map('normal', 'j', '', 'noremap') call denite#custom#map('normal', 'k', '', 'noremap') ================================================ FILE: .vim/rc/plugins/lightline.vim ================================================ if ! exists('g:lightline') let g:lightline = {} endif if ! has_key(g:lightline, 'component') let g:lightline.component = {} endif if ! has_key(g:lightline, 'component_visible_condition') let g:lightline.component_visible_condition = {} endif let g:lightline.colorscheme = 'seoul256' let g:lightline.component.anzu = '%{anzu#search_status()}' let g:lightline.component.fugitive = '%{fugitive#head()}' let g:lightline.component_visible_condition.fugitive = '(exists("*fugitive#head") && ""!=fugitive#head())' let g:lightline.active = { \ 'right': [ \ ['syntastic', 'lineinfo'], \ ['percent'], \ ['fileformat', 'fileencoding', 'filetype'], \ ], \ 'left' : [ \ ['mode', 'paste'], \ ['fugitive'], \ ['readonly', 'filename', 'modified'], \ ['ale'] \ ], \ } let g:lightline.component_expand = { \ 'syntastic' : 'SyntasticStatuslineFlag', \ } let g:lightline.component_type = { \ 'syntastic' : 'error', \ } let g:lightline.component_function = { \ 'ale' : 'ALEGetStatusLine', \ } let g:lightline.tabline = { \ 'left': [ ['tabs'] ], \ } let g:lightline.tab = { \ 'active' : ['tabnum', 'readonly', 'filename', 'modified'], \ 'inactive' : ['tabnum', 'readonly', 'filename', 'modified'], \ } ================================================ FILE: .vim/rc/plugins/neocomplete.vim ================================================ if ! exists('g:neocomplete#force_omni_input_patterns') let g:neocomplete#force_omni_input_patterns = {} endif let g:neocomplete#enable_smart_case = 1 let g:neocomplete#max_list = 1000 let g:neocomplete#force_overwrite_completefunc = 1 let g:neocomplete#force_omni_input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' let g:neocomplete#force_omni_input_patterns.objc = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' let g:neocomplete#force_omni_input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' let g:neocomplete#force_omni_input_patterns.objcpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' let g:neocomplete#sources#syntax#min_keyword_length = 3 let g:neocomplete#keyword_patterns = {} let g:neocomplete#keyword_patterns.default = '\h\w*' let g:neocomplete#delimiter_patterns = {} let g:neocomplete#delimiter_patterns.vim = ['#'] let g:neocomplete#delimiter_patterns.perl = [] let g:neocomplete#delimiter_patterns.ruby = ['::'] call neocomplete#custom#source('omni', 'rank', 7) call neocomplete#custom#source('omni', 'converters', ['converter_remove_last_paren']) imap neocomplete#smart_close_popup() . "\(smartinput_C-h)" imap neocomplete#smart_close_popup() . "\(smartinput_BS)" inoremap neocomplete#undo_completion() autocmd MyInit CmdwinEnter * let b:neocomplete_sources = ['vim'] ================================================ FILE: .vim/rc/plugins/quickrun.vim ================================================ if !exists('g:quickrun_config') let g:quickrun_config = {} endif let g:quickrun_config['prove/carton'] = { \ 'exec' : 'carton exec -- %c %o %s', \ 'command' : 'prove', \ } let g:quickrun_config['prove/carton/contextual'] = extend(g:quickrun_config['prove/carton'], { \ 'exec' : 'TEST_METHOD=%a ' . g:quickrun_config['prove/carton'].exec, \ }) " let g:quickrun_config.vim = { " \ 'outputter' : 'error', " \ 'outputter/error/success' : 'null', " \ 'outputter/error/error' : 'buffer', " \ } " vim:set foldmethod=marker: ================================================ FILE: .vim/rc/plugins/syntastic.added.vim ================================================ let g:syntastic_mode_map = { \ 'mode' : 'passive', \ } augroup auto-syntastic autocmd! autocmd BufWritePost *.rb, *.js, *.scala call s:syntastic() augroup END function! s:syntastic() abort SyntasticCheck call lightline#update() endfunction ================================================ FILE: .vim/rc/plugins/unite.added.vim ================================================ " mapping {{{ nnoremap [unite] nmap gj [unite] nmap [unite]p (project-files) nmap [unite]f (files) nmap [unite]F (files-from-buffer) nmap [unite]w (windows) nmap [unite][ (outline) nmap [unite]: (history) nmap [unite]q (quickfix) nmap [unite]t (tabs) nmap [unite]B (buffers) nmap [unite]mv (rename) nmap [unite]G (ghq-list) if has('gui_running') nmap [unite]b (tab-buffers) else nmap [unite]b (buffers) endif " definitions {{{ nnoremap (project-files) :Unite file_rec/git -hide-source-names -buffer-name=files nnoremap (files) :UniteWithCurrentDir file file/new -hide-source-names -buffer-name=files nnoremap (files-from-buffer) :UniteWithBufferDir file file/new -hide-source-names -buffer-name=files nnoremap (windows) :Unite window:no-current -no-empty nnoremap (outline) :Unite outline -hide-source-names -winwidth=40 -buffer-name=outline nnoremap (history) :Unite history/command -start-insert nnoremap (quickfix) :Unite quickfix -no-quit -no-empty -auto-resize -buffer-name=quickfix nnoremap (tabs) :Unite tab:no-current -no-empty -immediately nnoremap (tab-buffers) :Unite buffer_tab -no-empty nnoremap (buffers) :Unite buffer -no-empty nnoremap (rename) ':Unite file -input=' . expand('%:p') . ' -default-action=exrename -immediately' nnoremap (ghq-list) :Unite ghq " }}} " }}} function! s:unite_my_settings() " {{{ let unite = unite#get_current_unite() nmap (unite_delete_backward_path) nnoremap h unite#do_action('left') nnoremap l unite#do_action('right') nnoremap j unite#do_action('below') nnoremap k unite#do_action('above') nnoremap p unite#do_action('preview') if unite.buffer_name == 'files' nnoremap r unite#do_action('rename') endif endfunction " }}} " variables {{{ let g:unite_data_directory = $VIM_CACHE_DIR . '/unite' let g:unite_force_overwrite_statusline = 0 if executable('ag') let g:unite_source_grep_command = 'ag' let g:unite_source_grep_default_opts = '--nocolor --nogroup' let g:unite_source_grep_recursive_opt = '' let g:unite_source_grep_max_candidates = 200 endif " }}} " autocmd {{{ autocmd MyInit FileType unite nmap (unite_delete_backward_path) autocmd MyInit FileType unite call s:unite_my_settings() " }}} " Custom sources {{{ " unite-git-files-conflict {{{ let s:unite_git_files_conflict = { \ 'name' : 'git/files/conflict', \ } function! s:unite_git_files_conflict.gather_candidates(args, context) let output = unite#util#system('git diff-files --name-only --diff-filter=U') let candidates = map(split(output, "\n"), '{ \ "word" : fnamemodify(v:val, ":p"), \ "source" : "git/files/conflict", \ "kind" : "file", \ "action__path" : fnamemodify(v:val, ":p"), \ }') return candidates endfunction call unite#define_source(s:unite_git_files_conflict) " }}} " unite-git-files-modified {{{ let s:unite_git_files_modified = { \ 'name' : 'git/files/modified', \ } function! s:unite_git_files_modified.gather_candidates(args, context) let output = unite#util#system('git ls-files --modified') let candidates = map(split(output, "\n"), '{ \ "word" : fnamemodify(v:val, ":p"), \ "source" : "git/files/modified", \ "kind" : "file", \ "action__path" : fnamemodify(v:val, ":p"), \ }') return candidates endfunction call unite#define_source(s:unite_git_files_modified) " }}} " unite-git-files-others {{{ let s:unite_git_files_others = { \ 'name' : 'git/files/others', \ } function! s:unite_git_files_others.gather_candidates(args, context) let output = unite#util#system('git ls-files --others --exclude-standard') let candidates = map(split(output, "\n"), '{ \ "word" : fnamemodify(v:val, ":p"), \ "source" : "git/files/others", \ "kind" : "file", \ "action__path" : fnamemodify(v:val, ":p"), \ }') return candidates endfunction call unite#define_source(s:unite_git_files_others) " }}} " }}} call unite#custom#default_action('source/ghq/*', 'tabnew_lcd') " converter_relative_abbr: 候補を表示するときに相対パスに " matcher_project_files: 候補はリポジトリのファイルからのみ call unite#custom#source('file_mru', 'matchers', ['converter_relative_abbr', 'matcher_project_files', 'matcher_fuzzy']) let s:unite_project_ignore_pattern = '\.\(gif\|jpe\?g\|png\|min\.js\|vendor\)' call unite#custom#source('file_rec/git', 'ignore_pattern', s:unite_project_ignore_pattern) " vim:set foldmethod=marker: ================================================ FILE: .vim/rc/plugins/watchdogs.vim ================================================ let g:watchdogs_check_BufWritePost_enable = 1 let g:watchdogs_check_BufWritePost_enables = { \ "typescript": 0, \ } if !exists('g:quickrun_config') let g:quickrun_config = {} endif let g:quickrun_config['watchdogs_checker/_'] = { \ 'outputter/quickfix/open_cmd' : '', \ 'hook/hier_update/enable_exit' : 1, \ 'runner/vimproc/updatetime' : 40, \ } let g:quickrun_config['watchdogs_checker/efm_perl'] = { \ 'command' : expand('~/.vim/tools/efm_perl.pl'), \ 'exec' : '%c %o %s:p', \ 'quickfix/errorformat' : '%f:%l:%m', \ } let g:quickrun_config['watchdogs_checker/cpanfile'] = { \ 'command' : 'perl', \ 'exec' : '%c %o -w -MModule::CPANfile -e "Module::CPANfile->load(q|%S:p|)"', \ 'quickfix/errorformat' : '%m\ at\ %f\ line\ %l%.%#', \ } let g:quickrun_config['perl/watchdogs_checker'] = { \ 'type' : 'watchdogs_checker/efm_perl', \ } let g:quickrun_config['cpanfile/watchdogs_checker'] = { \ 'type' : 'watchdogs_checker/cpanfile', \ } call watchdogs#setup(g:quickrun_config) ================================================ FILE: .vim/snippets/eruby.snip ================================================ snippet case <% case ${1:object} %> <% when ${2:condition} %> ${3} <% end %> snippet when <% when ${1:condition} %> ${2} snippet if <% if ${1:condition} %> ${2} <% end %> snippet ife <% if ${1:condition} %> ${2} <% else %> ${3} <% end %> snippet unless <% unless ${1:condition} %> ${2} <% end %> ================================================ FILE: .vim/snippets/io.snip ================================================ snippet if if(${1:/* condition */}, ${2:/* then-clause */}) snippet ife if(${1:/* condition */}, ${2:/* then-clause */}, ${3:/* else-clause */}) ================================================ FILE: .vim/snippets/javascript.snippet ================================================ snippet func alias function function (${0:args}) {${1:body}}; snippet if if (${1:true}) ${0:$TM_SELECTED_TEXT} snippet for for (var ${2:i}=0; $2 < ${1:Things}.length; $2++) { ${0} }; ================================================ FILE: .vim/snippets/markdown.snippet ================================================ snippet link [${1:#:title}](${2:#:url}) snippet link_paste [${1}](`getreg('+')`) snippet image ![${1:#:alt text}](${2:#:url}) snippet image_paste ![${1}](`getreg('+')`) snippet README options head # ${1:NAME} ${2:DESCRIPTION} ## Usage ${3:USAGE} ## License ${4:LICENSE} # vim:set ft=neosnippet noexpandtab: ================================================ FILE: .vim/snippets/objc.snip ================================================ " vim:set noexpandtab: snippet import #import "${1:Header}.h" snippet if if (${1:condition}) { ${2} } snippet else else { ${1} } snippet elif abbr else_if else if (${1:condition}) { ${2} } snippet method abbr instance_method - (${1:ReturnType})${2:MethodName} { ${3} } snippet cmethod abbr class_method + (${1:ReturnType})${2:MethodName} { ${3} } snippet for_in for (${1:value} in ${2:FastEnumeration}) { ${3} } snippet block ^(${1:args}) { ${2} } snippet extern extern ${1:type} const ${2:Constant}; snippet const ${1:type} const ${2:NAME} = ${3:value}; ================================================ FILE: .vim/snippets/perl.snip ================================================ # vim:set ft=snippet noet: snippet pl #!/usr/bin/env perl use strict; use warnings; alias shebang snippet use use ${1:Package}; snippet uselib use lib 'lib', glob "${1:Package}"; snippet ddd require Data::Dumper; sub p ($) { warn Data::Dumper->new(\@_)->Useqq(1)->Terse(1)->Dump(); } ${1} snippet sub_self options head sub ${1:method} { my ($self${2:#:rest args}) = @_; ${3:# body} } snippet sub_class options head sub ${1:method} { my ($class${2:#:rest args}) = @_; ${3:#:# body} } snippet package options head package ${1:`substitute(substitute(expand('%:p:r'), '.*/lib/', '', 'g'), '/', '::', 'g')`}; use strict; use warnings; ${2:#:body} 1; snippet package_block options head package ${1:`substitute(substitute(expand('%:p:r'), '.*/lib/', '', 'g'), '/', '::', 'g')`} { ${2:#:body} } snippet t options head package ${1:`substitute(substitute(expand('%:p:r'), '.*/t/', 't-', 'g'), '-', '::', 'g')`}; sub _require : Test(startup => 1) { require_ok '${2:`substitute(substitute(expand('%:p:r'), '.*/t/', '', 'g'), '-', '::', 'g')`}'; } ${2:#:# body} 1; snippet subtest subtest ${1:test_name} => sub { ${2:#:body} }; snippet tests sub ${1:test_name} : Tests { ${2:#:body} } snippet todo_test TODO: { local $TODO = '${1:reason}'; fail '$1'; }; ================================================ FILE: .vim/snippets/rspec.snip ================================================ snippet describe describe ${1:object} do ${2} end snippet it it "${1:description}" do ${2} end snippet specify specify "${1:description}" do ${2} end snippet context context "${1:case}" do ${2} end snippet expect expect { ${1:subject} }.${2:to} \ ${3} snippet change change ... from ... by ... change { ${1:object} }.from(${2:pre}).to(${3:post}) snippet change change ... by change { ${1:object} }.by(${2:pre}) snippet let let(:${1:name}) { ${2} } snippet let! let!(:${1:name}) { ${2} } ================================================ FILE: .vim/snippets/ruby.snip ================================================ # vim:set ft=snippet noet: snippet shebang #!/usr/bin/env ruby snippet =b =begin rdoc ${1} =end snippet beg abbr begin rescue end begin ${3} rescue ${1:Exception} => ${2:e} end snippet req require "${1}"${2} snippet case case ${1:object} when ${2:condition} ${3} end snippet when when ${1:condition} ${2} snippet if if ${1:condition} ${2} end snippet if else if ${1:condition} ${2} else ${3} end snippet unless unless ${1:condition} ${2} end snippet while while ${1:condition} ${2} end snippet for for ${1:e} in ${2:c} ${3} end snippet until until ${1:condition} ${2} end snippet module module ${1:ModuleName} ${2} end snippet class class ${1:ClassName} ${2} end snippet class self abbr class << self class << self ${1} end snippet def def ${1:method_name} ${2} end snippet defs abbr def self.method ... end def self.${1:class_method_name} ${2} end snippet atr abbr attr_reader attr_reader :${1:attr_names} snippet atw abbr attr_writer attr_writer :${1:attr_names} snippet ata abbr attr_accessor attr_accessor :${1:attr_names} snippet do var end abbr do |var| ... end do |${1:variable}| ${2} end snippet do end abbr do ... end do ${1} end snippet open open(${1:"path/or/url/or/pipe"}, "${2:w}") {|${3:io}| ${4} } snippet task desc "${1:Task description\}" task :${2:task_name => [:dependent, :tasks]} do ${3} end snippet describe describe ${1:object} do ${2} end snippet it it "${1:description}" do ${2} end snippet context context "${1:case}" do ${2} end snippet before before do ${1} end snippet before each before :each do ${1} end snippet before all before :all do ${1} end snippet after after do ${1} end snippet after each after :each do ${1} end snippet after all after :all do ${1} end snippet subject subject do ${1} end ================================================ FILE: .vim/snippets/tap.snip ================================================ snippet subtest abbr st subtest ${1:test_name} => sub { ${2:# test cases} }; ================================================ FILE: .vim/snippets/textile.snip ================================================ snippet link "${1:#:title}":${2:#:url} snippet link_paste "${1:#:title}":`getreg('+')` snippet image !${1:#:url}! snippet image_paste !`getreg('+')`! snippet pre
${1:#:code}
snippet collapse options head {{collapse ${1} }} # vim:set noexpandtab ================================================ FILE: .vim/snippets/tt2.snip ================================================ snippet if [% IF ${1:condition} %] ${2:then} [% END # IF $1 %] snippet ife [% IF ${1:condition} %] ${2:then} [% ELSE %] ${3:else} [% END # IF $1 %] snippet unless [% UNLESS ${1:condition} %] ${2:then} [% END # UNLESS $1 %] snippet foreach [% FOREACH ${1:element} IN ${2:collection} %] ${3:loop} [% END # FOREACH $1 IN $2 %] snippet include [% INCLUDE "${1:path}" %] ================================================ FILE: .vim/snippets/tt2html.snip ================================================ include tt2.snip ================================================ FILE: .vim/snippets/vim.snip ================================================ # vim:set ft=neosnippet noet: snippet plugin_config let ${2:symbol} = neobundle#get('${1:plugin_name}') function! $2.hooks.on_source(bundle) " {{{ ${3:TARGET} endfunction " }}} unlet $2 snippet lazybundle options head NeoBundleLazy '${1:owner}/${2:name}' " {{{ call neobundle#config('$2', { ${3:config} }) " }}} ================================================ FILE: .vim/snippets/zsh.snip ================================================ include sh.snip snippet length ${#${1:variable}} snippet capitalize ${(C)${1:variable}} snippet downcase ${(L)${1:variable}} snippet upcase ${(U)${1:variable}} snippet keys ${(k)${1:variable}} snippet split ${(s:${1:pattern}:)${2:variable}} snippet join ${(j:${1:needle}:)${2:variable}} snippet split_by_newline abbr splitlf ${(f)${1:variable}} snippet join_by_newline abbr joinlf ${(F)${1:variable}} snippet sort_asc ${(o)${1:variable}} snippet sort_desc ${(O)${1:variable}} snippet sort_numeric abbr sort_num ${(n)${1:variable}} snippet function abbr func options head function ${1:func}() { # {{{ ${2:#:body} } # }}} ================================================ FILE: .vim/tools/efm_perl.pl ================================================ #!/usr/bin/env perl # stolen from https://github.com/hakobe/dotfiles/blob/master/.vim/tools/efm_perl.pl use strict; use warnings; use Cwd; use File::Basename; use File::Spec; my $file = shift or die "No filename to check!\n"; my $dir = dirname( $file ) . '/lib'; my $cwd = cwd(); my $error = qr{(.*)\sat\s(.*)\sline\s(\d+)(\.|,\snear\s\".*\"?)}; # Error messages to be skipped. my @skip = ( '"DB::single" used only once: possible typo', 'BEGIN failed--compilation aborted', ); my $skip = join '|', map { quotemeta $_ } @skip; my @checks; push @checks, '-M-circular::require' if `perldoc -l circular::require 2> /dev/null`; push @checks, '-M-indirect' if `perldoc -l indirect 2> /dev/null`; push @checks, '-Mwarnings::method' if `perldoc -l warnings::method 2> /dev/null`; push @checks, '-Mwarnings::unused' if `perldoc -l warnings::unused 2> /dev/null`; # uninit is not included in 5.10 and later push @checks, '-Muninit' if ( $] < 5.010 ) && `perldoc -l uninit 2> /dev/null`; my @incs; push @incs, "-I $cwd/lib"; push @incs, "-I $cwd/t/lib"; push @incs, map { "-I $_" } glob("$cwd/modules/*/lib"); # need to turn on taint if it's on the shebang line. # naive check for [tT] switch ... will both t and T ever be used at the same time? my ( $taint ) = `head -n 1 $file` =~ /\s.*-.*?(t)/i; push @checks, "-$taint" if defined $taint; my $checks = join(' ', @checks); my $incs = join(' ', @incs); my $command = (-f "$cwd/cpanfile") || (-f "$cwd/Makefile.PL") ? "carton exec @incs -- perl @incs @checks -c $file 2>&1" : # cartonのバージョン違いの吸収のために@incsが二回展開されてる "perl @incs @checks -c $file 2>&1"; my ( $message, $extracted_file, $lineno, $rest ); for my $line ( `$command` ) { chomp $line; next if $line =~ /$skip/; $line =~ s/([()])/\\$1/g; if ( ( $message, $extracted_file, $lineno, $rest ) = $line =~ /^$error$/ ) { $message .= $rest if ($rest =~ s/^,//); print "$file:$lineno:$message\n"; } } ================================================ FILE: .vim/vimrc ================================================ " vim:set et foldmethod=marker: let did_load_filetypes = 1 let g:loaded_2html_plugin = 1 let g:loaded_getscriptPlugin = 1 let g:loaded_vimballPlugin = 1 function! s:OnLoaded() abort if !has('vim_starting') echomsg '---> Reload bundles' call dein#call_hook('source') call dein#call_hook('post_source') endif syntax enable filetype plugin indent on endfunction runtime rc/00_base.vim runtime rc/00_autocmd.vim runtime rc/10_dein.vim runtime rc/20_tab.vim runtime rc/20_key.vim runtime rc/20_command.vim if !has('vim_starting') echomsg '---> Reload bundles' call dein#call_hook('source') call dein#call_hook('post_source') endif syntax enable filetype plugin indent on ================================================ FILE: .vimperator/colors/solarized_light.vimp ================================================ hi clear hi StatusLine < nnoremap k 5 " page info nnoremap g nnoremap nnoremap q nnoremap y :jsutil.copyToClipboard(buffer.URL) cnoremap cnoremap cnoremap " for AquaSKK cnoremap " }}} " Command {{{ command! -nargs=+ sitesearch :exe ":tabopen site:" + content.document.domain " }}} " Quickmarks {{{ silent qmark r http://reader.livedoor.com/reader/ silent qmark m https://mail.google.com/mail/#mbox " }}} ignorekeys add -except=:,d,t,gT mail\.google\.com autocmd VimperatorEnter .* source ~/.vimperatorrc.js colorscheme solarized_light " vim:set ft=vim foldmethod=marker: ================================================ FILE: .vimperatorrc.js ================================================ liberator.globalVariables.hBookmark_shortcuts = { hintsAdd: 'Ba', hintsComment: 'Bc', add: ['C'], comment: ['c'], }; if (typeof hBookmark != 'undefined') { liberator.loadScript('chrome://hatenabookmark/content/vimperator/plugin/hatenabookmark.js', { __proto__: this }); } ================================================ FILE: .zsh.d/functions/_carton ================================================ #compdef carton function _carton () { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in command) _values 'carton commands' \ version'[Display version]' \ update'[Update the dependencies]' \ tree'[Show the tree of dependency graph]' \ show'[Show the module information]' \ list'[List dependencies tracked in the cpanfile.snapshot file]' \ check'[Check if your cpanfile and local environment are in sync]' \ install'[Install the dependencies]' \ bundle'[Bundle cached tarballs in vendor/cache]' \ 'exec[execute your script in a carton local environment]' ;; options) case $line[1] in update) _arguments \ '*:MODULE:_perl_modules' ret=0 ;; show) _arguments \ '*:MODULE:_perl_modules' ret=0 ;; list) _arguments \ --distfile'[Displays the list of distributions in a distfile format]' ret=0 ;; check|tree|version) ret=0 ;; bundle) _arguments \ {-h,--help}'[Show help message]' \ --no-fatpack'[Skip generating fatpacked "carton" in "vendor/bin"]' ret=0 ;; install) _arguments \ {-h,--help}'[Show help message]' \ --deployment'[Force the deployment mode. See "DEPLOYMENT MODE" above]' \ --cached'[Locate distribution tarballs in "vendor/cache" rather than fetching them from CPAN mirrors]' \ --cpanfile'[Specify the alternate path for cpanfile]:cpanfile:_files' \ --path'[Specify the path to install modules to]:path:_dirs' \ --without'[You can specify phases or features to exclude, in the comma separated list]:phases_or_features' ret=0 ;; exec) _normal ret=0 ;; esac esac } _carton "$@" # vim:set ft=zsh: ================================================ FILE: .zsh.d/functions/_padrino ================================================ #compdef padrino _runtime_options=( --help'[Show help usage]' \ {-e,--environment}'[Padrino Environment]:ENVIRONMENT:(test development production)' \ {-c,--chdir}'[Change to dir before starting]:CHDIR:_files -/' ) _padrino() { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in command) _values "padrino subcommands" \ {g,gen,generate}'[Executes the Padrino generator with given options]' \ {c,console}'[Boots up the Padrino application irb console]' \ {s,start}'[Starts the Padrino application]' \ help'[Describe available tasks or one specific task]' \ rake'[Execute rake tasks]' \ stop'[Stops the Padrino application]' \ version'[Show current Padrino Version]' ;; options) case $line[1] in start|s) _arguments $_runtime_options \ {-a,--server}'[Rack Handler (default: autodetect)]:SERVER' \ {-p,--port}'[Use PORT (default: 3000)]:N' \ {-h,--host}'[Bind to HOST address (default: 0.0.0.0)]:HOST' \ {-d,--daemonize}'[Run daemonized in the buckground]' \ {--debug}'[Set debugging flags]' \ {-e,--environment}'[Padrino Environment]:ENVIRONMENT:(test development production)' \ ret=0 ;; stop) _arguments $_runtime_options \ {-p,--pid}'[File to store pid (default: tmp/pids/server.pid)]:PID' ret=0 ;; generate|gen|g) __padrino_generate ;; esac ;; esac } __padrino_generate() { local curcontext="$curcontext" state line typeset -A opt_args _generators_options=( --help'[Show help usage]' \ {-r,--root}'[The root destination (default: .)]:ROOT:_files -/' \ {-d,--destroy} ) _arguments -C \ ':command:->command' \ '*::options:->options' case $state in command) _arguments -C $_generators_options _values 'padrino generators' \ 'project' \ 'app' \ 'mailer' \ 'controller' \ 'model' \ 'migration' \ 'plugin[sets up a plugin within a Padrino application]' ;; options) case $line[1] in app) _arguments $_generators_options \ {-i--tiny}'[Generate tiny app skeleton]' ret=0 ;; controller) _arguments $_generators_options \ {-a,--app}'[The application destination path]:APP:_files -/' ret=0 ;; mailer) _arguments $_generators_options \ {-a,--app}'[The application destination path]:APP:_files -/' ret=0 ;; migration) _arguments $_generators_options ret=0 ;; model) _arguments $_generators_options \ {-a,--app}'[The application destination path]:APP:_files -/' \ {-s,--skip-migration} ret=0 ;; plugin) _arguments $_generators_options \ {-l,--list}'[list available plugins]' ret=0 ;; project) _arguments $_generators_options \ '*:APP' \ {-n,--app}'[The application name]:APP' \ {-b,--bundle}'[Run bundle install]' \ --dev'[Use padrino from a git checkout]' \ {-i,--tiny}'[Generate tiny app skeleton]' \ {-a,--adapter}'[SQL adapter for ORM (default: sqlite)]:ADAPTER:(sqlite mysql mysql2 postgres)' \ {-p,--template}'[Generate project from template]:TEMPLATE:_files' \ {-d,--orm}'[The database engine component (default: none)]:ORM:(activerecord mini_record datamapper mongomapper mongoid sequel couchrest ohm mongomatic ripple none)' \ {-t,--test}'[The testing framework component (default: none)]:TEST:(rspec shoulda cucumber bacon testspec riot minitest)' \ {-m,--mock}'[The mocking library component (default: none)]:MOCK:(mocha rr none)' \ {-s,--script}'[The javascript library component (default: none)]:SCRIPT:(jquery prototype rightjs mootools extcore dojo none)' \ {-e,--renderer}'[The template engine component (default: haml)]:RENDERER:(haml erb liquid slim none)' \ {-c,--stylesheet}'[The stylesheet component (default: none)]:STYLESHEET:(less sass compass scss none)' esac ;; esac } _padrino "$@" # vim:set ft=zsh ================================================ FILE: .zsh.d/functions/_pkgutil ================================================ #compdef pkgutil function _pkgutil() { local curcontext=$curcontext state line ret=1 declare -A opt_args _arguments -C \ '(-): :->command' \ '(-)*:: :->option-or-argument' case $state in command) __pkgutil_commands && return 0 ;; option-or-argument) if (( $+functions[__pkgutil_$words[1]] )); then _call_function ret __pkgutil_$words[1] else : # TODO fi ;; esac return $ret } function __pkgutil_commands() { local curcontext=$curcontext state line ret=1 declare -A opt_args local -a __pkgutil_receipt_database_commands __pkgutil_receipt_database_commands=( {--packages,--pkgs}:'List all installed package IDs on the specified --volume' --pkgs-plist:'List all installed package IDs on the specified --volume in Mac OS X plist(5) format' --files:'List all of the files installed under the package-id' --export-plist:'Print all receipt information about the specified package-id in the standard Mac OS X plist(5) format' --verify:'Run repair_packages(8) to verify the specified package-id' --repair:'Run repair_packages(8) to repair the specified package-id' --pkg-info:'Print extended information about the specified package-id' --pkg-info-plist:'Print extended information about the specified package-id in Mac OS X plist(5) format' --forget:'Discard all receipt data about package-id, but do not touch the installed files' --learn:'Update the ACLs of the given path in the receipt identified by --edit-pkg' --pkg-groups:'List all of the package groups this package-id is a member of' --groups:'List all of the package groups on the specified --volume' --groups-plist:'List all of the package groups on the specified --volume in Mac OS X plist(5) format.' --group-pkgs:'List all of the packages that are members of this group-id.' --file-info:'Show the metadata known about path.' --file-info-plist:'Show the metadata known about path in Mac OS X plist(5) format.' ) local -a __pkgutil_options __pkgutil_options=( {-h,--help}':A brief summary of commands and usage' {-f,--force}":Don't ask for confirmation before performing a potentially destructive or ambiguous operation" {-v,--verbose}':Output in a "human-readable" format with extra headers, footers, indentation, and other contextual information' --volume":Perform all operations on the specified volume or home directory. The root volume '/' will be used if unspecified" \ --edit-pkg':Specifies an existing receipt to be modified in-place by --learn' --only-files':List only files (not directories) in --files listing' --only-dirs':List only directories (not files) in --files listing' --regexp":Try to match package-id arguments as a regular expression if an exact match isn't found. See egrep(1) and re_format(7) for syntax" ) local -a __pkgutil_file_commands __pkgutil_file_commands=( --expand:'Expand the flat package at pkg-path into a new directory specified by dir-path' --flatten:'Flatten the dir-path into a new flat package created at pkg-path' --bom:'Extract any BOM files from the flat pkg at path into /tmp and return the filename(s).' --payload-files:'List the files archived within the payload of the uninstalled flat package(s) contained at path' --check-signature:'Check the validity and trust of the signature on the package at pkg-path.' ) _describe -t pkgutil-options "Options" __pkgutil_options && ret=0 _describe -t pkgutil-receipt-database-commands "Receipt Database Commands" __pkgutil_receipt_database_commands && ret=0 _describe -t pkgutil-file-commands "File Commands" __pkgutil_file_commands && ret=0 return $ret } function __pkgutil_package_ids() { local -a package_ids package_ids=($(pkgutil --pkgs 2>/dev/null)) _values 'package-id' $package_ids } function __pkgutil_group_ids() { local -a group_ids group_ids=($(pkgutil --groups 2>/dev/null)) _values 'group-id' $group_ids } function __pkgutil_--volume() { _arguments -C '*:path:_dirs' && return 0 } function __pkgutil_--edit-pkg() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--verify() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--repair() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--pkg-info() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--pkg-info-plist() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--forget() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--learn() { _arguments -C '*:path:_files' && return 0 } function __pkgutil_--pkg-groups() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--group-pkgs() { _arguments -C '*:group-id:__pkgutil_group_ids' && return 0 } function __pkgutil_--file-info() { _arguments -C '*:path:_files' && return 0 } function __pkgutil_--file-info-plist() { _arguments -C '*:path:_files' && return 0 } function __pkgutil_--files() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--export-plist() { _arguments -C '*:package-id:__pkgutil_package_ids' && return 0 } function __pkgutil_--bom() { _arguments -C '*:path:_files' && return 0 } function __pkgutil_--payload-files() { _arguments -C '*:path:_files' && return 0 } function __pkgutil_--check-signature() { _arguments -C '*:pkg-path:_files' && return 0 } # TODO function __pkgutil_--expand # TODO function __pkgutil_--flatten # vim:set ft=zsh: ================================================ FILE: .zsh.d/functions/_prove ================================================ #compdef prove typeset -A options local context state line _arguments -s -C \ '*:TEST:_files' \ {-a,--archive}'[Store the resulting TAP in an archive file.]':OUTPUT:_files \ {-b,--blib}"[Add 'blib/lib' and 'blib/arch' to the path for your tests]" \ {-c,--color}'[Colored test output (default).]' \ {-o,--comments}'[Show comments.]' \ --count'[Show the X/Y test count when not verbose (default)]' \ --directives'[Only show results with TODO or SKIP directives.]' \ {-D,--dry}'[Dry run. Show test that would have run.]' \ {-e,--exec}"[Interpreter to run the tests ('' for compiled tests.)]":EXECUTOR \ --ext"[Set the extension for tests (default '.t')]":EXTENSION \ {-f,--failures}'[Show failed tests.]' \ --formatter'[Result formatter to use. See FORMATTERS.]':FORMATTER \ --harness'[Define test harness to use. See TAP::Harness.]':HARNESS \ {-?,-h,--help}'[Display this help]' \ -I'[Library paths to include.]':DIR:_dirs \ --ignore-exit'[Ignore exit status from test scripts.]' \ {-j,--jobs}'[Run N test jobs in parallel (try 9.)]':N \ {-l,--lib}"[Add 'lib' to the path for your tests (-Ilib).]" \ -M'[Load a module.]':MODULE:_perl_modules \ {-H,--man}'[Longer manpage for prove]' \ {-m,--merge}"[Merge test scripts' STDERR with their STDOUT.]" \ --nocolor'[Do not color test output.]' \ --nocount'[Disable the X/Y test count.]' \ --norc"[Don't process default .proverc]" \ --normalize'[Normalize TAP output in verbose output]' \ -P'[Load plugin (searches App::Prove::Plugin::*.)]':PLUGIN \ {-p,--parse}'[Show full list of TAP parse errors, if any.]' \ {-q,--quiet}'[Suppress some test output while running tests.]' \ {-Q,--QUIET}'[Only print summary results.]' \ --rc'[Process options from rcfile]':RCFILE:_files \ {-r,--recurse}'[Recursively descend into directories.]' \ --reverse'[Run the tests in reverse order.]' \ {-s,--shuffle}'[Run the tests in random order.]' \ --source'[Load and/or configure a SourceHandler. See SOURCE HANDLERS.]':HANDLER \ --state"[Control prove's persistent state.]":OPTION:'(last failed passed all hot todo slow fast new old fresh save)' \ -T'[Enable tainting checks.]' \ -t'[Enable tainting warnings.]' \ --timer'[Print elapsed time after each test.]' \ --trap'[Trap Ctrl-C and print summary on interrupt.]' \ {-v,--verbose}'[Print all test lines.]' \ -W'[Enable fatal warnings.]' \ -w'[Enable warnings.]' # vim:set ft=zsh: ================================================ FILE: .zsh.d/functions/_proxychains4 ================================================ #compdef proxychains4 local curcontext="$curcontext" state line ret=1 _arguments -C \ '*:: :->app' && ret=0 case "$state" in app) _normal && ret=0 ;; esac return ret # vim: set ft=sh: ================================================ FILE: .zsh.d/functions/_rails ================================================ #compdef rails _runtime_options=( '(-f --force -s --skip)'{-f,--force}'[Overwrite files that already exist]' {-p,--pretend}'[Run but do not make any changes]' {-q,--quiet}'[Supress status output]' '(-s --skip -f --force)'{-s,--skip}'[Skip files that already exist]' ) _rails() { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in command) _values "rails subcommands" \ {g,generate}'[Generate new code]' \ {c,console}'[Start the Rails console]' \ {s,server}'[Start the Rails server]' \ {db,dbconsole}'[Start a console for the database specified in config/database.yml]' \ {d,destroy}'[Undo code generated with "generate"]' \ {r,runner}'[Run a piece of code in the application environment]' \ benchmarker'[See how fast a piece of code runs]' \ new'[Create a new Rails application]' \ application'[Generate the Rails application code]' \ profiler'[Get profile information from a piece of code]' \ plugin'[Install a plugin]' ;; options) case $line[1] in console|c) _arguments \ {-h,--help}'[Show help message]' \ --sandbox'[Rollback database modifications on exit]' \ --debugger'[Enable ruby-debugging for the console]' ret=0 ;; server|s) _arguments \ {-h,--help}'[Show help message]' \ {-p,--port}'[Runs Rails on the specified port]:port' \ {-b,--binding}'[Binds Rails to the specified ip]:ip' \ {-c,--config}'[Use custom rackup configuration file]:file:_files' \ {-d,--daemon}'[Make server run as a Daemon]' \ {-u,--debugger}'[Enable ruby-debugging for the server]' \ {-e,--environment}'[Specifies the environment to run this server under (test/development/production)]:name:(test development production)' \ {-p,--pid}'[Specifies the PID file]:pid' ret=0 ;; dbconsole|db) _arguments \ {-h,--help}'[Show help message]' \ {-p,--include-password}'[Automatically provide the password from database.yml]' \ --mode'[Automatically put the sqlite3 database in the specified mode]:MODE:(html list line column)' \ --header ret=0 ;; application|new) _arguments \ '*:APP_PATH:_files -/' \ {-h,--help}'[Show help message]' \ $_runtime_options \ {-r,--ruby}'[Path to the Ruby binary of your choice]:PATH' \ {-b,--builder}'[Path to a application builder (can be a filesystem path or URL)]:BUILDER:_files' \ {-m,--template}'[Path to an application template (can be a filesystem path or URL)]:TEMPLATE:_files' \ --skip-gemfile"[Don't create a Gemfile]" \ "(--skip-gemfile --skip-bundle)--skip-bundle[Don't run bundle install]" \ {-G,--skip-git}'[Skip Git ignores and keeps]' \ {-O,--skip-active-record}'[Skip Active Record files]' \ {-S,--skip-sprockets}'[Skip Sprockets files]' \ {-d,--database}'[Preconfigure for selected database]:DATABASE:(mysql oracle postgresql sqlite3 frontbase ibm_db sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc)' \ '(-J --skip-javascript -j --javascript)'{-j,--javascript}'[Preconfigure for selected JavaScript library]:JAVASCRIPT' \ '(-J --skip-javascript -j --javascript)'{-J,--skip-javascript}'[Skip JavaScript files]' \ '(--dev --edge)--dev[Setup the application with Gemfile pointing to your Rails checkout]' \ '(--edge --dev)--edge[Setup the application with Gemfile pointing to Rails repository]' \ {-T,--skip-test-unit}'[Skip Test::Unit files]' \ --old-style-hash"[Force using old style hash (:foo => 'bar') on Ruby >= 1.9]" ;; generate|g) __rails_generate ;; esac ;; esac } __rails_generate() { local curcontext="$curcontext" state line typeset -A opt_args _generators_optins=( --skip-namespace'[Skip namespace (affects only isolated applications)]' \ --old-style-hash"[Force using old style hash (:foo => 'bar') on Ruby >= 1.9]" \ ) _arguments -C \ ':command:->command' \ '*::options:->options' case $state in command) _arguments -C $_runtime_options _values 'rails generators' \ 'assets[Stubs out new asset placeholders.]' \ 'controller[Stubs out a new controller and its views.]' \ 'generator[Stubs out a new generator at lib/generators.]' \ 'helper[Stubs out a new helper.]' \ 'integration_test[Create rails files for integration_test generator]' \ 'mailer[Stubs out a new maiiler and its views.]' \ 'migration[Create rails files for migration generator.]' \ 'model[Create rails files for model generator.]' \ 'observer[Create rails files for observer generator.]' \ 'performance_test[Create rails files for performance_test generator.]' \ 'resource[Create rails files for resource generator.]' \ 'scaffold[Scaffolds an entire resource, from model and migration to controller and views, along with a full test suite]' \ 'scaffold_controller[Stubs out a scaffolded controller and its views.]' \ 'session_migration[Create rails files for session_migration generator.]' \ 'task[Stubs out a new Rake task.]' ;; options) case $line[1] in assets) _arguments -C $_runtime_options $_generators_optins \ {-j,--javascripts}'[Generate JavaScripts]:boolean:(true false)' \ {-y,--stylesheets}'[Generate Stylesheets]:boolean:(true false)' \ {-je,--javascript-engine}'[Engine for JavaScripts]:JAVASCRIPT_ENGINE' \ {-se,--stylesheet-engine}'[Engine for Stylesheets]:STYLESHEET_ENGINE' ;; controller) _arguments -C $_runtime_options $_generators_optins \ {-e,--template-engine}'[Template engine to be invoked]:NAME' \ {-t,--test-framework}'[Test framework to be invoked]:NAME' \ --helper'[Indicates when to generate helper]:boolean:(true false)' \ --assets'[Indicates where to generate assets]:boolean:(true false)' ;; generatorer) _arguments -C $_runtime_options $_generators_optins \ --namespace'[Namespace generator under lib/generators/name]:boolean:(true false)' ;; helper) _arguments -C $_runtime_options $_generators_optins \ {-t,--test-framework}'[Test framework to be invoked]:NAME' ;; integration_test) _arguments -C $_runtime_options $_generators_optins \ --integration-tool'[Integration tool to be invoked]:NAME' ;; mailer) _arguments -C $_runtime_options $_generators_optins \ {-e,--template-engine}'[Template engine to be invoked]:NAME' \ {-t,--test-framework}'[Test framework to be invoked]:NAME' ;; migration) _arguments -C $_runtime_options $_generators_optins \ {-o,--orm}'[ORM to be invoked]:NAME' ;; model) _arguments -C $_runtime_options $_generators_optins \ {-o,--orm}'[ORM to be invoked]:NAME' ;; observer) _arguments -C $_runtime_options $_generators_optins \ {-o,--orm}'[ORM to be invoked]:NAME' ;; performance_test) _arguments -C $_runtime_options $_generators_optins \ --performance-tool'[Performance tool to be invoked]:NAME' ;; resource) _arguments -C $_runtime_options $_generators_optins \ --force-plural'[Forces the use of a plural ModelName]' \ {-o,--orm}'[ORM to be invoked]:NAME' \ {-c,--resource-controller}'[Resource controller to be invoked]:NAME' \ {-a,--actions}'[Resource controller to be invoked]:ACTION' \ {-e,--template-engine}'[Template engine to be invoked]:NAME' \ --helper'[Indicates when to generate helper]:boolean:(true false)' \ --assets'[Indicates where to generate assets]:boolean:(true false)' ;; scaffold) _arguments -C $_runtime_options $_generators_optins \ {-o,--orm}'[ORM to be invoked]:NAME' \ {-c,--scaffold-controller}'[Scaffold controller to be invoked]:NAME' \ {-e,--template-engine}'[Template engine to be invoked]:NAME' \ {-y,--stylesheets}'[Generate Stylesheets]:boolean:(true false)' \ {-se,--stylesheet-engine}'[Engine for Stylesheets]:STYLESHEET_ENGINE' \ --force-plural'[Forces the use of a plural ModelName]' \ --assets'[Indicates where to generate assets]:boolean:(true false)' \ --helper'[Indicates when to generate helper]:boolean:(true false)' ;; scaffold_controller) _arguments -C $_runtime_options $_generators_optins \ {-o,--orm}'[ORM to be invoked]:NAME' \ {-e,--template-engine}'[Template engine to be invoked]:NAME' \ {-t,--test-framework}'[Test framework to be invoked]:NAME' \ --force-plural'[Forces the use of a plural ModelName]' \ --helper'[Indicates when to generate helper]:boolean:(true false)' ;; session_migration) _arguments -C $_runtime_options $_generators_optins \ {-o,--orm}'[ORM to be invoked]:NAME' ;; task) _arguments -C $_runtime_options $_generators_optins ;; esac ;; esac } _rails "$@" # vim:set ft=zsh ================================================ FILE: .zsh.d/functions/_tsocks ================================================ #compdef tsocks local curcontext="$curcontext" state line ret=1 _arguments -C \ '*:: :->app' && ret=0 case "$state" in app) _normal && ret=0 ;; esac return ret # vim: set ft=sh: ================================================ FILE: .zsh.d/functions/git_info ================================================ # vim:set ft=zsh foldmethod=marker: git_info() { # {{{ # http://d.hatena.ne.jp/uasi/20091025/1256458798 if [[ $(git rev-parse --is-inside-work-tree 2>/dev/null) != "true" ]]; then return fi local git==git local st color annotation stashes local name=$($git symbolic-ref --short HEAD 2> /dev/null) name=${name:="(detached)"} local git_dir=$($git rev-parse --git-dir 2> /dev/null) local action=$(VCS_INFO_git_getaction "$git_dir") action=${action:+"($action)"} # Remote and Local changes {{{ local \ threshold \ current_remote \ merge_name \ remote_ref \ revs_count \ behind_count \ ahead_count \ behind_and_ahead current_remote=$($git config branch.${name}.remote 2> /dev/null) merge_name=$($git config branch.${name}.merge 2> /dev/null) local is_tracked local -a remote_local_revs if [[ "." = "$current_remote" ]] || [[ "x" = "x$current_remote" ]]; then # Clone from local remote_ref=$merge_name remote_local_revs=($($git rev-list --left-right ${merge_name}...HEAD)) is_tracked="" else remote_ref="refs/remotes/${current_remote}/${merge_name#refs/heads/}" remote_local_revs=($($git rev-list --left-right ${remote_ref}...HEAD)) is_tracked=" %{${fg[green]}%}♺%{${reset_color}%}" fi local ahead_commits_color="${fg[green]}" local behind_commits_color="${fg[red]}" local ahead_annotation="+" local behind_annotation="-" revs_count=$#remote_local_revs local -a behind_commits ahead_commits behind_commits=(${(M)remote_local_revs:#<*}) ahead_commits=(${(M)remote_local_revs:#>*}) ahead_count=$#ahead_commits behind_count=$#behind_commits if [[ $ahead_count -gt 0 ]]; then behind_and_ahead="${behind_and_ahead} %{$ahead_commits_color%}${ahead_annotation}${ahead_count}%f%b" fi if [[ $behind_count -gt 0 ]]; then behind_and_ahead="${behind_and_ahead} %{$behind_commits_color%}${behind_annotation}${behind_count}%f%b" fi # }}} # stashes count {{{ declare -a stashes_count local stash_annotation="⟐" stashes_count=($($git stash list --format='format:%h' 2> /dev/null)) if [[ $#stashes_count > 0 ]]; then stashes=" %{${fg[yellow]}%}${stash_annotation}$#stashes_count" fi # }}} st=$($git status --short --porcelain -b 2> /dev/null) # Staged changes {{{ if [[ -n `echo "$st" | grep "^[UMADRC]"` ]]; then # Staged color=%F{yellow} annotation="${annotation}${color}*" fi # }}} # Untracked changes {{{ if [[ -n `echo "$st" | grep "??"` ]]; then # Untracked color=%F{yellow} annotation="${annotation}${color}?%f" fi # }}} # Changed, but not staged {{{ if [[ -n `echo "$st" | grep "^[ ][MD]"` ]]; then # Changed, but not staged color=%F{red} annotation="${annotation}${color}!%f" fi # }}} if [[ -z "$color" ]]; then color=%F{green} fi echo "${color}${name}${action}${annotation}${behind_and_ahead}${stashes}%f%b${is_tracked}" } # }}} ================================================ FILE: .zsh.d/functions/gyapbox ================================================ # vim:set ft=zsh: function gyapbox() { local base_dir=~/Dropbox/Public/g local enable_notify=0 if whence terminal-notifier >/dev/null; then enable_notify=1 fi if [[ -z "$DROPBOX_USER_ID" ]]; then echo "\$DROPBOX_USER_ID must be specified" return 1 fi if [[ ! -d $base_dir ]]; then echo "\$base_dir is not found" return 1 fi local preview if [[ $1 = '-P' ]]; then preview="-P" fi local timestamp_hash="$(date +%s | md5)" local image_filename="${timestamp_hash}.png" local image_path="$base_dir/$image_filename" if [ $enable_notify ]; then terminal-notifier -message "Take a screen capture" -title "Gyapbox" fi screencapture $preview -i "$base_dir/$image_filename" if [[ -e "$image_path" ]]; then local url="http://dl.dropboxusercontent.com/u/$DROPBOX_USER_ID/g/$image_filename" if [ $enable_notify ] && [[ -n "$url" ]]; then terminal-notifier -message "Captured" -title "Gyapbox" -open "$url" fi echo -n $url | pbcopy fi } ================================================ FILE: .zsh.d/functions/llenv_version_origin ================================================ llenv_version_origin() { local llenv="$1" local llenv_root="$($llenv root)" local global_version_file="${llenv_root}/version" local version_origin="$($llenv version-origin)" local version_source if [[ $version_origin = $global_version_file ]]; then version_source='global' elif [[ -f $version_origin ]]; then version_source='local' else version_source='shell' fi echo $version_source } # vim:set ft=zsh: ================================================ FILE: .zsh.d/functions/prompt_aereal_setup ================================================ # vim:set ft=zsh foldmethod=marker: function prompt_aereal_setup() { # {{{ if ! (which add-zsh-hook > /dev/null); then autoload -Uz add-zsh-hooks fi add-zsh-hook precmd aereal_update_prompt } # }}} function detect_ruby_version() { # {{{ which rbenv > /dev/null 2>&1 if [ $? -ne 0 ]; then return fi echo "ruby-$(rbenv version-name)" } # }}} function detect_perl_version() { # {{{ which plenv > /dev/null 2>&1 if [ $? -ne 0 ]; then return fi echo "perl-$(plenv version-name)" } # }}} function detect_python_version() { # {{{ which pyenv > /dev/null 2>&1 if [ $? -ne 0 ]; then return fi echo "python-$(pyenv version-name)" } # }}} function git_repository_relative_dir() { # {{{ if ! git rev-parse --is-inside-work-tree 1>/dev/null 2>&1; then return fi local project repository_dir prefix repository_dir=${${$(git rev-parse --show-cdup 2>/dev/null):-"."}:a} project=${repository_dir:t} prefix=$(git rev-parse --show-prefix 2>/dev/null) echo "${project}${prefix:+":$prefix"}" } # }}} function aereal_update_prompt() { # {{{ local \ ruby_version \ perl_version \ additional_info \ current_working_directory \ git_info \ top_line \ command_line ruby_version="%{${fg[red]}%}$(detect_ruby_version)%{${reset_color}%}" perl_version="%{${fg[blue]}%}$(detect_perl_version)%{${reset_color}%}" python_version="%{${fg[green]}%}$(detect_python_version)%{${reset_color}%}" git_info=$(git_info) git_info=${git_info:+" [$git_info]"} if git rev-parse --is-inside-work-tree 1>/dev/null 2>&1; then current_working_directory="%{${fg[yellow]}%}$(git_repository_relative_dir)%{${reset_color}%}" else current_working_directory="%{${fg[magenta]}%}%~%{${reset_color}%}" fi additional_info="${ruby_version} ${perl_version} ${python_version}" top_line="${current_working_directory:+"(${current_working_directory})"}${git_info}" ok_prompt=" %{${fg[yellow]}%}X | _ | X%{${reset_color}%} < " ng_prompt=" %{${fg[red]}%}X > _ < X%{${reset_color}%} < " command_line="%(?,$ok_prompt,$ng_prompt)" PROMPT="$(echo -n "${top_line}\n${command_line}")" RPROMPT=${additional_info:+"($additional_info)"} } prompt_aereal_setup "$@" ================================================ FILE: .zsh.d/functions/prompt_aereal_unicode_setup ================================================ # vim:set ft=zsh foldmethod=marker: function prompt_aereal_unicode_setup() { # {{{ if ! (which add-zsh-hook > /dev/null); then autoload -Uz add-zsh-hooks fi add-zsh-hook precmd aereal_unicode_update_prompt } # }}} function detect_ruby_version() { # {{{ which rbenv > /dev/null 2>&1 if [ $? -ne 0 ]; then return fi echo "ruby-$(rbenv version-name)" } # }}} function detect_perl_version() { # {{{ which plenv > /dev/null 2>&1 if [ $? -ne 0 ]; then return fi echo "perl-$(plenv version-name)" } # }}} function detect_python_version() { # {{{ which pyenv > /dev/null 2>&1 if [ $? -ne 0 ]; then return fi echo "python-$(pyenv version-name)" } # }}} function git_repository_relative_dir() { # {{{ if ! git rev-parse --is-inside-work-tree 1>/dev/null 2>&1; then return fi local project repository_dir prefix repository_dir=${${$(git rev-parse --show-cdup 2>/dev/null):-"."}:a} project=${repository_dir:t} prefix=$(git rev-parse --show-prefix 2>/dev/null) echo "${project}${prefix:+":$prefix"}" } # }}} function aereal_unicode_update_prompt() { # {{{ local \ ruby_version \ perl_version \ additional_info \ current_working_directory \ git_info \ top_line \ command_line ruby_version="%{${fg[red]}%}$(detect_ruby_version)%{${reset_color}%}" perl_version="%{${fg[blue]}%}$(detect_perl_version)%{${reset_color}%}" python_version="%{${fg[green]}%}$(detect_python_version)%{${reset_color}%}" git_info=$(git_info) git_info=${git_info:+" [$git_info]"} if git rev-parse --is-inside-work-tree 1>/dev/null 2>&1; then current_working_directory="%{${fg[yellow]}%}$(git_repository_relative_dir)%{${reset_color}%}" else current_working_directory="%{${fg[magenta]}%}%~%{${reset_color}%}" fi additional_info="${ruby_version} ${perl_version} ${python_version}" top_line="${current_working_directory:+"(${current_working_directory})"}${git_info}" ok_prompt=" %{${fg[yellow]}%}✘╹◡╹✘%{${reset_color}%} < " ng_prompt=" %{${fg[red]}%}✘>﹏<✘%{${reset_color}%} < " command_line="%(?,$ok_prompt,$ng_prompt)" PROMPT="$(echo -n "${top_line}\n${command_line}")" RPROMPT=${additional_info:+"($additional_info)"} } prompt_aereal_unicode_setup "$@" ================================================ FILE: .zsh.d/functions/prompt_lambda_setup ================================================ function prompt_lambda_setup() { # {{{ if ! (whence add-zsh-hook >/dev/null); then autoload -Uz add-zsh-hooks fi add-zsh-hook precmd __prompt_lambda_update # vcs_info configuration {{{ autoload -Uz vcs_info zstyle ':vcs_info:*' max-exports 3 zstyle ':vcs_info:*' enable git zstyle ':vcs_info:git:*' formats '[%b]' '%c%u %m' zstyle ':vcs_info:git:*' actionformats '[%b]' '%c%u %m' '' zstyle ':vcs_info:git:*' check-for-changes true zstyle ':vcs_info:git:*' stagedstr '+' zstyle ':vcs_info:git:*' unstagedstr '-' # }}} autoload -Uz llenv_version_origin } # }}} function __prompt_lambda_update() { # {{{ # components {{{ local ok_lambda="%F{cyan}λ%f" local bad_lambda="%F{red}λ%f" local command_line="%(?.${ok_lambda}.${bad_lambda}) ... " local working_directory="%F{cyan}%~%f" local accessory_info="${working_directory}" local git_msg # Git info {{{ LANG=C vcs_info local -a git_msgs [[ -n "$vcs_info_msg_0_" ]] && git_msgs+=("%F{green}${vcs_info_msg_0_}%f") [[ -n "$vcs_info_msg_1_" ]] && git_msgs+=("%F{yellow}${vcs_info_msg_1_}%f") [[ -n "$vcs_info_msg_2_" ]] && git_msgs+=("%F{red}${vcs_info_msg_2_}%f") git_msg="${(j: :)git_msgs}" # }}} # Perl version {{{ local perl_version_source=$(llenv_version_origin plenv) case "$perl_version_source" in "local"|shell) accessory_info="%F{blue}Perl-$(plenv version-name)%f ${accessory_info}" ;; *) ;; esac # }}} # Ruby version {{{ local ruby_version_source=$(llenv_version_origin rbenv) case "$ruby_version_source" in "local"|shell) accessory_info="%F{red}Ruby-$(rbenv version-name)%f ${accessory_info}" ;; *) ;; esac # }}} # }}} # join by newline local -a left_prompt_lines left_prompt_lines=( ${accessory_info} ${command_line} ) # join by whitespace local -a right_prompt_components right_prompt_components=( ${git_msg} ) PROMPT="${(F)left_prompt_lines}" RPROMPT="${(j: :)right_prompt_components}" } # }}} prompt_lambda_setup "$@" # vim:set ft=zsh foldmethod=marker: ================================================ FILE: .zsh.d/functions/prompt_yuno_setup ================================================ function prompt_yuno_setup() { # {{{ if ! (whence add-zsh-hook >/dev/null); then autoload -Uz add-zsh-hooks fi add-zsh-hook precmd __prompt_yuno_update # zsh-git-prompt export ZSH_GIT_PROMPT_ROOT="$ZSH_HOME/plugins/zsh-git-prompt" if [[ -f "$ZSH_GIT_PROMPT_ROOT/zshrc.sh" ]]; then export ZSH_THEME_GIT_PROMPT_CACHE=1 source "$ZSH_GIT_PROMPT_ROOT/zshrc.sh" fi if [[ -f "$ZSH_GIT_PROMPT_ROOT/dist/build/gitstatus/gitstatus" ]]; then export GIT_PROMPT_EXECUTABLE='haskell' fi export ZSH_THEME_GIT_PROMPT_PREFIX="" export ZSH_THEME_GIT_PROMPT_SUFFIX="" export ZSH_THEME_GIT_PROMPT_SEPARATOR="|" export ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}" export ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[blue]%}%{.%G%}" export ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[red]%}%{!%G%}" export ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[yellow]%}%{!%G%}" export ZSH_THEME_GIT_PROMPT_BEHIND="%{<%G%}" export ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[green]%}%{>%G%}" export ZSH_THEME_GIT_PROMPT_UNTRACKED="%{?%G%}" export ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}%{*%G%}" autoload -Uz llenv_version_origin } # }}} function __prompt_yuno_update() { # {{{ # components {{{ local ok_yuno="%F{yellow}✘╹◡╹✘%f" local bad_yuno="%F{red}✘>﹏<✘%f" local command_line="%(?.${ok_yuno}.${bad_yuno}) < " local working_directory="%F{cyan}%~%f" local accessory_info="${working_directory}" # Perl version {{{ local perl_version_source=$(llenv_version_origin plenv) case "$perl_version_source" in "local"|shell) accessory_info="%F{blue}Perl-$(plenv version-name)%f ${accessory_info}" ;; *) ;; esac # }}} # Ruby version {{{ local ruby_version_source=$(llenv_version_origin rbenv) case "$ruby_version_source" in "local"|shell) accessory_info="%F{red}Ruby-$(rbenv version-name)%f ${accessory_info}" ;; *) ;; esac # }}} # }}} # join by newline local -a left_prompt_lines left_prompt_lines=( ${accessory_info} ${command_line} ) # join by whitespace local -a right_prompt_components right_prompt_components=( $(git_super_status) ) PROMPT="${(F)left_prompt_lines}" RPROMPT="${(j: :)right_prompt_components}" } # }}} prompt_yuno_setup "$@" # vim:set ft=zsh foldmethod=marker: ================================================ FILE: .zshenv ================================================ # to avoid overwritten PATH via /usr/libexec/path_helper # refs. https://github.com/Homebrew/homebrew-core/pull/32074#issuecomment-421381869 unsetopt GLOBAL_RCS # environment export LC_ALL=ja_JP.UTF-8 export DEVEL_PATH=$HOME/devel export EDITOR=vim export HOMEBREW_PATH=/opt/homebrew export HOMEBREW_NO_AUTO_UPDATE=1 export HOMEBREW_NO_ENV_HINTS=1 export HOMEBREW_NO_INSECURE_REDIRECT=1 export HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED=1 if [[ -f $HOMEBREW_PATH/bin/bat ]]; then export HOMEBREW_BAT=1 fi path=( $HOME/bin(N-/) $DEVEL_PATH/bin(N-/) $HOME/.mysqlenv/bin(N-/) $HOME/.mysqlenv/shims(N-/) $HOME/.pyenv/bin(N-/) $HOME/.pyenv/shims(N-/) $HOME/.rbenv/bin(N-/) $HOME/.rbenv/shims(N-/) $HOME/.plenv/bin(N-/) $HOME/.plenv/shims(N-/) $HOME/.ndenv/bin(N-/) $HOME/.ndenv/shims(N-/) $HOME/.cargo/bin(N-/) $GOPATH/bin(N-/) $HOME/.local/share/aquaproj-aqua/bin(N-/) $HOME/.rd/bin(N-/) $HOME/.local/share/mise/shims(N-/) $HOMEBREW_PATH/opt/node@20/bin(N-/) $HOMEBREW_PATH/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin(N-/) $HOMEBREW_PATH/opt/perl/bin(N-/) $HOMEBREW_PATH/lib/ruby/gems/2.7.0/bin(N-/) $HOMEBREW_PATH/opt/ruby/bin(N-/) $HOMEBREW_PATH/opt/mysql-client/bin(N-/) $HOMEBREW_PATH/opt/mysql-client@8.0/bin(N-/) $HOMEBREW_PATH/opt/coreutils/libexec/gnubin(N-/) $HOMEBREW_PATH/opt/postgresql@16/bin(N-/) $HOMEBREW_PATH/bin(N-/) /usr/local/go/bin(N-/) /mnt/c/Windows(N-/) /mnt/c/Windows/System32/OpenSSH(N-/) /mnt/c/Users/trast/AppData/Local/Programs/Microsoft\ VS\ Code/bin(N-/) /usr/bin(N-/) /usr/sbin(N-/) /bin(N-/) /sbin(N-/) ) typeset -U manpath manpath=( $HOMEBREW_PATH/share/man(N-/) $HOMEBREW_PATH/opt/coreutils/libexec/gnuman(N-/) /usr/share/man(N-/) ) export PAGER=less export LESS='--LONG-PROMPT --RAW-CONTROL-CHARS --tabs=3' if whence code 2>&1 >/dev/null; then EDITOR='code --wait' fi if whence code 2>&1 >/dev/null; then EDITOR='code --wait' fi MACVIM_APP= local -a macvim_app_candidates=( /opt/homebrew-cask/Caskroom/macvim-kaoriya/*/MacVim.app(N-/) $HOMEBREW_PATH/opt/macvim/MacVim.app(N-/) $HOME/Applications/MacVim.app(N-/) /Applications/MacVim.app(N-/) ) if (( $#macvim_app_candidates > 0 )); then MACVIM_APP="$macvim_app_candidates[1]" fi export MACVIM_APP if [[ -x /usr/libexec/java_home ]] && /usr/libexec/java_home >/dev/null 2>&1; then export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" fi RUBY_CONFIGURE_OPTS="" openssl_dir="$HOMEBREW_PATH/opt/openssl@1.1" if [[ -d "$openssl_dir" ]]; then RUBY_CONFIGURE_OPTS="${RUBY_CONFIGURE_OPTS} --with-openssl-dir=${openssl_dir}" fi readline_dir="$HOMEBREW_PATH/opt/readline" if [[ -d "$readline_dir" ]]; then RUBY_CONFIGURE_OPTS="${RUBY_CONFIGURE_OPTS} --with-readline-dir=${readline_dir}" fi export RUBY_CONFIGURE_OPTS rover_env="$HOME/.rover/env" if [[ -f "$rover_env" ]]; then . $rover_env fi ================================================ FILE: .zshrc ================================================ bindkey -v # function load path {{{ typeset -Ua fpath fpath=( $HOME/.zsh.d/functions(N-/) $HOMEBREW_PATH/share/zsh-completions(N-/) $HOMEBREW_PATH/share/zsh/site-functions(N-/) $HOMEBREW_PATH/share/zsh/functions(N-/) $HOMEBREW_PATH/opt/docker-completion/share/zsh/site-functions(N-/) $HOMEBREW_PATH/opt/docker-compose-completion/share/zsh/site-functions(N-/) $fpath ) # }}} # fundamental options {{{ export REPORTTIME=1 setopt extended_glob # }}} # history {{{ HISTFILE=$HOME/.zsh_history HISTSIZE=10000000 SAVEHIST=$HISTSIZE set \ extended_history \ hist_ignore_dups \ hist_ignore_space \ inc_append_history \ share_history \ no_flow_control \ hist_save_no_dups \ hist_ignore_all_dups autoload history-search-end zle -N history-beginning-search-backward-end history-search-end zle -N history-beginning-search-forward-end history-search-end bindkey -v "^N" history-beginning-search-forward-end bindkey -v "^P" history-beginning-search-backward-end bindkey -v "^R" history-incremental-pattern-search-backward bindkey -v "^S" history-incremental-pattern-search-forward # }}} # color {{{ autoload -Uz colors; colors [[ -f "$HOME/.dircolors" ]] && source "$HOME/.dircolors" # }}} # completion {{{ zmodload -i zsh/complist autoload -U compinit && compinit -C setopt \ complete_in_word \ glob_complete \ hist_expand \ no_beep \ numeric_glob_sort # Format {{{ zstyle ':completion:*' format '%F{magenta}-- %d --%f' zstyle ':completion:*' group-name '' zstyle ':completion:*:options' description yes zstyle ':completion:*:options' auto-description '%d' zstyle ':completion:*:corrections' format ' %F{yellow}-- %d (errors: %e) --%f' zstyle ':completion:*:descriptions' format ' %F{magenta}-- %d --%f' zstyle ':completion:*:messages' format ' %F{blue}-- %d --%f' zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' zstyle ':completion:*:default' list-prompt '%S%M matches%s' # Show selected candidate zstyle ':completion:*:default' menu select=2 zstyle ':completion:*:default' list-colors "${(s.:.)LS_COLORS}" # Fuzzy match zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z} r:|[._-]=*' zstyle ':completion:*' completer _oldlist _complete _match _ignored _approximate _prefix # sudo zstyle ':completion:sudo:*' environ PATH="$SUDO_PATH:$PATH" # Directory candidates order zstyle ':completion:*:cd:*' tag-order local-directories path-directories # Ignore current directory from directory candidates zstyle ':completion:*' ignore-parents parent pwd # Process candidates zstyle ':completion:*:*:*:*:processes' command 'ps -u $USER -o pid,user,comm -w' zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01' zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:*:kill:*' force-list always zstyle ':completion:*:*:kill:*' insert-ids single # Show man candidates with section zstyle ':completion:*:manuals' separate-sections true # }}} # key mapping {{{ bindkey -M menuselect 'h' vi-backward-char bindkey -M menuselect 'l' vi-forward-char bindkey -M menuselect 'j' vi-down-line-or-history bindkey -M menuselect 'k' vi-up-line-or-history # }}} # }}} # url-quote-magic {{{ autoload -Uz url-quote-magic zle -N self-insert url-quote-magic # }}} # expand backslash to tilde {{{ # Originally from: https://github.com/cho45/dotfiles/blob/64ea90d17aaf6c46a2cb090f2e12a6e3d7df6034/.zshrc#L245 expand-to-home-or-complete() { # {{{ if [ "$LBUFFER" = "" -o "$LBUFFER[-1]" = " " ]; then LBUFFER+="~/" else zle self-insert fi } # }}} zle -N expand-to-home-or-complete bindkey -v "\\" expand-to-home-or-complete # }}} # ghq {{{ __widget_cd_repo() { local selected_repo=$( ghq list | fzf ) if [[ -n "$selected_repo" ]]; then BUFFER="pushd $(ghq root)/${selected_repo}" zle accept-line fi zle -R -c } zle -N __widget_cd_repo bindkey -v "^]^G" __widget_cd_repo # }}} # git {{{ __widget_git_recent_branches() { local selected_branch=$( \ git for-each-ref --sort=-committerdate --format="%(refname) %(committerdate:relative)" -- refs/heads \ | sed -E 's/refs\/heads\///' \ | fzf --query "$LBUFFER" \ | cut -f1 \ ) if [[ -n "$selected_branch" ]]; then BUFFER="git checkout ${selected_branch}" zle accept-line fi zle -R -c } zle -N __widget_git_recent_branches bindkey -v "^]gr" __widget_git_recent_branches # }}} # tmux: split window with vim-like key mappings {{{ # vertical split {{{ tmux_vsplit() { BUFFER="tmux split-window -d -p 50 -h '$BUFFER'" # TODO: escape zle accept-line } zle -N tmux_vsplit bindkey -v "^Wv" tmux_vsplit # }}} # horizontal split {{{ tmux_split() { BUFFER="tmux split-window -d -p 50 -v '$BUFFER'" # TODO: escape zle accept-line } zle -N tmux_split bindkey -v "^Ws" tmux_split # }}} # }}} # alias {{{ alias :q=exit if whence eza >/dev/null 2>&1; then alias l='eza -aF' alias ls='eza -aF' alias ll='eza -alF' else if whence gls >/dev/null; then alias l='gls --color=auto -AF' alias ls='gls --color=auto -AF' alias ll='gls --color=auto -AFl' else alias l='ls -GAF' alias ls='ls -GAF' alias ll='ls -GAFl' fi fi whence hub >/dev/null 2>&1 && alias git=hub # }}} # abbrev {{{ setopt extended_glob typeset -A abbreviations abbreviations=( 'Ig' '| rg' 'It' '| tail' 'Ij' '| jq' 'DC' 'docker-compose' ) magic-abbrev-expand() { local MATCH LBUFFER=${LBUFFER%%(#m)[-_a-zA-Z0-9]#} LBUFFER+=${abbreviations[$MATCH]:-$MATCH} zle self-insert } no-magic-abbrev-expand() { LBUFFER+=' ' } zle -N magic-abbrev-expand zle -N no-magic-abbrev-expand bindkey -v " " magic-abbrev-expand bindkey -v "^x " no-magic-abbrev-expand # }}} # prompt {{{ setopt \ prompt_subst \ prompt_percent \ transient_rprompt autoload -U promptinit && promptinit autoload -Uz vcs_info zstyle ':vcs_info:*' max-exports 4 zstyle ':vcs_info:(git|svn):*' formats '%R' '%S' '%b' '%s' zstyle ':vcs_info:(git|svn):*' actionformats '%R' '%S' '%b|%a' '%s' zstyle ':vcs_info:*' formats '%R' '%S' '%s:%b' '%s' zstyle ':vcs_info:*' actionformats '%R' '%S' '%s:%b|%a' '%s' __configure_prompt() { local ok_yuno="%F{yellow}✘╹◡╹✘%f" local bad_yuno="%F{red}✘>﹏<✘%f" local command_line="[%D{%Y-%m-%d} %*] %(?.${ok_yuno}.${bad_yuno}) < " psvar=() STY= LANG=en_US.UTF-8 vcs_info repos=`print -nD "$vcs_info_msg_0_"` if [[ -n "$vcs_info_msg_1_" ]]; then vcs="$vcs_info_msg_3_" else vcs='' fi [[ -n "$repos" ]] && psvar[2]="$repos" [[ -n "$vcs_info_msg_1_" ]] && psvar[3]="$vcs_info_msg_1_" [[ -n "$vcs_info_msg_2_" ]] && psvar[1]="$vcs_info_msg_2_" local psdirs='[%F{yellow}%3(v|%32<..<%3v%<<|%60<..<%~%<<)%f]' local psvcs='%3(v|[%25<\<<%F{yellow}%2v%f@%F{blue}%1v%f%<<]|)' local git_is_dirty git_local_changes git_upstream_changes if git rev-parse --is-inside-work-tree &>/dev/null; then command git diff --no-ext-diff --quiet --exit-code || git_is_dirty='%F{yellow}*%f' local git_upstream_status=$(command git rev-list --left-right --count ...@{u} 2>/dev/null) git_upstream_status=(${(ps:\t:)git_upstream_status}) local left=${git_upstream_status[1]} right=${git_upstream_status[2]} (( ${left:-0} > 0 )) && git_local_changes='%F{green}⇡%f' (( ${right:-0} > 0 )) && git_upstream_changes='%F{red}⇣%f' fi export PROMPT="${command_line}" export RPROMPT="${psdirs}${git_is_dirty}${git_local_changes}${git_upstream_changes}${psvcs}" } autoload -Uz add-zsh-hooks add-zsh-hook precmd __configure_prompt # }}} # Show anyenv version {{{ notify_llenv_version() { for llenv in rbenv plenv ndenv pyenv; do llenv_root="${HOME}/.${llenv}" # XXX if whence $llenv >/dev/null && [[ "$(${llenv} version-origin)" != "$llenv_root/version" ]]; then echo "$fg[yellow]${llenv} changed version: $(${llenv} version-name)$reset_color" fi done } add-zsh-hook chpwd notify_llenv_version # }}} # Update current window name {{{ update_window_title() { # {{{ emulate -L zsh local -a cmd cmd=(${(z)2}) case $cmd[1] in *=*) # PLENV_VERSION=5.14.2 plenv exec perl -v => plenv echo -n "k$cmd[2]:t\\" return ;; ls|gls|clear|pwd) echo -n "k$ZSH_NAME\\" return ;; sudo|cd) echo -n "k$cmd[1] $cmd[2]:t\\" return ;; *) echo -n "k$cmd[1]:t\\" return ;; esac local -A jt jt=(${(kv)jobtexts}) $cmd >>(read num rest cmd=(${(z)${(e):-\$jt$num}}) echo -n "k$cmd[1]:t\\") 2>/dev/null } # }}} if [ "$TMUX" ] && [ "$TERM_PROGRAM" != "vscode" ]; then add-zsh-hook preexec update_window_title fi # }}} # direnv {{{ if whence direnv >/dev/null; then eval "$(direnv hook zsh)" fi # }}} # syntax highlight {{{ if [[ -f "$HOMEBREW_PATH/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then source $HOMEBREW_PATH/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh fi # }}} # substring-search {{{ if [[ -f "$HOMEBREW_PATH/opt/zsh-history-substring-search/zsh-history-substring-search.zsh" ]]; then source $HOMEBREW_PATH/opt/zsh-history-substring-search/zsh-history-substring-search.zsh bindkey -M vicmd "k" history-substring-search-up bindkey -M vicmd "j" history-substring-search-down fi # }}} if ! ssh-add -l 2>/dev/null; then echo '---> Add SSH private key' ssh-add fi if [[ -f '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc' ]]; then source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc' fi if whence op >/dev/null; then eval "$(op completion zsh)" compdef _op op fi FZF_DEFAULT_OPTS='--layout reverse' # tmux {{{ if whence tmux >/dev/null && [ -z "$TMUX" ] && [ "$TERM_PROGRAM" != "vscode" ]; then if $(tmux has-session 2>/dev/null); then tmux attach-session -t "${HOST%%.*}" else tmux new-session -s "${HOST%%.*}" fi FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --tmux" fi # }}} export FZF_DEFAULT_OPTS # vim:set foldmethod=marker: ================================================ FILE: Brewfile ================================================ brew "aqua" brew "readline" brew "awscli" brew "bat" brew "coreutils" brew "curl" brew "direnv" brew "eza" brew "fzf" brew "gh" brew "ghq" brew "git" brew "gnu-sed" brew "gnu-tar" brew "go" brew "jq" brew "ko" brew "mise" brew "moreutils" brew "mysql-client" brew "openssh" brew "pinact" brew "postgresql@16" brew "proctools" brew "pstree" brew "reattach-to-user-namespace" brew "ripgrep" brew "shared-mime-info" brew "tig" brew "tmux" brew "tree" brew "zsh" brew "zsh-completions" brew "zsh-history-substring-search" brew "zsh-syntax-highlighting" cask "1password-cli" cask "aquaskk" cask "font-cascadia-code" cask "font-hackgen" cask "gcloud-cli" cask "ghostty" cask "hammerspoon" cask "karabiner-elements" cask "rancher" cask "raycast" cask "visual-studio-code" cask "vivaldi" cask "witch" ================================================ FILE: README.md ================================================ # dotfiles ![Build Status](https://travis-ci.org/aereal/dotfiles.png?branch=master) This repository includes a lot of configuration file is used and optimized for me. You can clone or fork them freely, but I don't guarantee that they fit you. ## Tools configured * Git * Vim * tmux * Zsh * OS X (Preferences) * Ruby tools * Capistrano * Pow * Pry * Preferred gems ## Tools included These tools are included as submodule. * [cdd](https://github.com/m4i/cdd) - The utility to change working directory over the terminal multiplexor's window ## Policies * Automatation * Vim is the editor * Maximize the performance in loved environment ### Automation The setup process should be automated to keep syncing environment easy. ### Vim is the editor Using the tools as over the their domain is painful. ### Maximize the performance in loved environment It is stupid to spoil the performance to keep portability. ## Installation to be documented ... ================================================ FILE: Rakefile ================================================ require 'pathname' # methods def env_or_default(env: nil, default: nil) ENV.fetch(env, default) end def ensure_pathname(maybe_pathname) maybe_pathname === Pathname ? maybe_pathname : Pathname.new(maybe_pathname) end class Recipe include FileUtils::Verbose attr_reader :name, :source, :destination def initialize(name: nil, source: nil, destination: nil) @name = name @source = ensure_pathname(source) @destination = ensure_pathname(destination) end def install if self.destination.exist? puts "Skip #{self.name}" return end ln_s self.source.to_s, self.destination.to_s end def clean unless self.destination.exist? && self.destination.symlink? puts "Skip #{self.destination}; the destination seems not to be installed with the Rake task" return end rm self.destination.to_s end end # constants INSTALL_DIRECTORY = ensure_pathname(env_or_default(env: 'INSTALL_DIRECTORY', default: '~')).expand_path SOURCE_DIRECTORY = ensure_pathname(env_or_default(env: 'SOURCE_DIRECTORY', default: Dir.pwd)).expand_path DOTFILES_IGNORE_FILE = ensure_pathname(env_or_default(env: 'DOTFILES_IGNORE_FILE', default: SOURCE_DIRECTORY + '.dotfiles.ignore')).expand_path IGNORED_DOTFILES = DOTFILES_IGNORE_FILE.each_line.map {|f| SOURCE_DIRECTORY.join(f.strip) } DOTFILES = SOURCE_DIRECTORY.each_child.select {|e| e.basename.to_s.start_with?(?.) } INSTALLABLE_DOTFILES = DOTFILES - IGNORED_DOTFILES INSTALL_NAMES = INSTALLABLE_DOTFILES.map {|f| f.relative_path_from(SOURCE_DIRECTORY) } INSTALL_RECIPES = INSTALL_NAMES.map {|name| Recipe.new(name: name, source: SOURCE_DIRECTORY.join(name), destination: INSTALL_DIRECTORY.join(name)) } task :default => :install desc "Install dotfiles into #{INSTALL_DIRECTORY}" task :install do INSTALL_RECIPES.each do |recipe| recipe.install end end desc "Cleanup dotfiles that installed into #{INSTALL_DIRECTORY}" task :clean do INSTALL_RECIPES.each do |recipe| recipe.clean end end ================================================ FILE: bin/abbrev-cwd.go ================================================ package main import ( "os" "os/user" "path/filepath" "strings" ) func main() { var err error cwd, err := os.Getwd() if err != nil { panic(err) } currentUser, err := user.Current() if err != nil { panic(err) } homeDir := currentUser.HomeDir cwdWithTilde := strings.Replace(cwd, homeDir, "~/", 1) hiers := strings.Split(cwdWithTilde, "/") hiersLen := len(hiers) var abbreved []string for idx, h := range hiers { var formatted string if (idx == hiersLen-1) || h == "" { formatted = h } else { formatted = string(h[0]) } abbreved = append(abbreved, formatted) } println(filepath.Join(abbreved...)) } ================================================ FILE: bin/diff-highlight-wrapper ================================================ #!/bin/sh if test -x brew; then git_prefix=`brew --prefix git` else git_prefix='/usr/local' fi diff_highlight_command=$git_prefix/share/git-core/contrib/diff-highlight/diff-highlight if test -x $diff_highlight_command; then $diff_highlight_command | less else less fi ================================================ FILE: bin/generate-typable-words ================================================ #!/usr/bin/env ruby LEFT_CHARS = %w( a s d f g w e r v 3 4 5 ) LEFT_CANDIDATES = LEFT_CHARS.flat_map {|c| [c, c.upcase] } RIGHT_CHARS = %w( h j k l i o p n 8 9 0 ) RIGHT_CANDIDATES = RIGHT_CHARS.flat_map {|c| [c, c.upcase] } CANDIDATES = LEFT_CANDIDATES.shuffle.zip(RIGHT_CANDIDATES.shuffle).flatten MAX_RETRY_COUNT = 3 def generate_typable_words(candidates, length) candidates.take(length) end def generate_strong_typable_words(candidates, length, retry_count = 0) chars = generate_typable_words(candidates, length) if (retry_count <= MAX_RETRY_COUNT) && !(chars.grep(/[0-9]/).any? && chars.grep(/[a-z]/).any? && chars.grep(/[A-Z]/).any?) generate_strong_typable_words(candidates, length, retry_count + 1) else chars end end length = ARGV.grep(/[0-9]+/).first || 8 should_strong = ARGV.include?('--strong') strategy = should_strong ? :generate_strong_typable_words : :generate_typable_words word = self.__send__(strategy, CANDIDATES, length.to_i) print word.join('') ================================================ FILE: bin/git-authors.go ================================================ package main // original: https://github.com/dann/dotfiles/blob/master/devbin/git-authors import ( "fmt" "log" "os/exec" "regexp" "sort" "strconv" "strings" ) type Commit struct { Author string Commits int Insertions int Deletions int } func (c Commit) Ratio(total int) float64 { return float64(c.Commits) / float64(total) * 100.0 } type CommitsSummary []*Commit func (cs CommitsSummary) Len() int { return len(cs) } func (cs CommitsSummary) Swap(i, j int) { cs[i], cs[j] = cs[j], cs[i] } type ByCommitsCount struct { CommitsSummary } func (bcc ByCommitsCount) Less(i, j int) bool { return bcc.CommitsSummary[i].Commits < bcc.CommitsSummary[j].Commits } func String2Int(s string) int { var ( i int64 e error ) if i, e = strconv.ParseInt(s, 0, 0); e != nil { log.Fatal(e) return -1 } return int(i) } func CreateCommit(author string, commits int, ins int, del int) *Commit { c := new(Commit) c.Author = author c.Commits = commits c.Insertions = ins c.Deletions = del return c } func main() { out, err := exec.Command("git", "--no-pager", "log", "--format=%H %aN <%aE>", "--no-merges", "--shortstat").Output() if err != nil { log.Fatal(err) } commitPattern := regexp.MustCompile(`^([0-9a-f]{40}) (.*)$`) statsPattern := regexp.MustCompile(`(\d+) insert.* (\d+) delet*`) var currentAuthor string commitCounts := map[string]int{} inserts := map[string]int{} deletes := map[string]int{} totalCommits := 0 for _, l := range(strings.Split(string(out), "\n")) { if commitPattern.MatchString(l) { totalCommits += 1 m := commitPattern.FindStringSubmatch(l) if len(m) == 0 { continue } currentAuthor = m[2] } else if statsPattern.MatchString(l) { m := statsPattern.FindStringSubmatch(l) if len(m) == 0 { continue } ins := String2Int(m[1]) del := String2Int(m[2]) commitCounts[currentAuthor] += 1 inserts[currentAuthor] += ins deletes[currentAuthor] += del } } var commits CommitsSummary for author, commitCount := range(commitCounts) { c := CreateCommit(author, commitCount, inserts[author], deletes[author]) commits = append(commits, c) } sort.Sort(sort.Reverse(ByCommitsCount{commits})) fmt.Printf("%10s %10s %10s %10s\n", "%", "commits", "+++", "---") for _, c := range(commits) { fmt.Printf("%9.2f%% %10d %10d %10d %s\n", c.Ratio(totalCommits), c.Commits, c.Insertions, c.Deletions, c.Author) } } ================================================ FILE: bin/git-catchup ================================================ #!/bin/bash # Catching up with upstream set -e command git fetch -q develop_branch='staging/master' upstream_ref=$develop_branch\@\{u\} if git rev-parse @{u} 2>/dev/null; then command git merge --no-ff $upstream_ref else git rebase $upstream_ref fi ================================================ FILE: bin/git-check-dirty ================================================ #!/bin/bash # refs. https://unix.stackexchange.com/questions/155046/determine-if-git-working-directory-is-clean-from-a-script if [[ -z "$(git status --short --untracked-files=normal --porcelain)" ]]; then exit 0 fi exit 1 ================================================ FILE: bin/git-git ================================================ #!/bin/sh exec git $@ ================================================ FILE: bin/git-issue-checkout ================================================ #!/usr/bin/env zsh local matched=$( git for-each-ref \ --sort=committerdate \ --format='%(refname)' \ refs/heads | \ grep "$1" ) if [[ -z $matched ]]; then echo "Issue tracking branch is not found" > /dev/stderr exit 1 fi git checkout ${matched#refs/heads/} ================================================ FILE: bin/git-normalize-url ================================================ #!/usr/bin/env ruby ORIGIN = 'origin' def run(argv) remote, * = ARGV remote ||= ORIGIN prev_remote_url = `git remote get-url #{remote}`.strip if prev_remote_url.start_with?('ssh://') require 'uri' prev_remote_url = URI.parse(prev_remote_url) new_remote_url = '%s@%s:%s' % [prev_remote_url.user, prev_remote_url.host, prev_remote_url.path[1..-1]] system 'git', 'remote', 'set-url', remote, new_remote_url puts "#{prev_remote_url} => #{new_remote_url}" end end run(ARGV) ================================================ FILE: bin/git-recent-branches ================================================ #!/usr/bin/env zsh function __git-recent-branches() { local count=${1:-10} git for-each-ref \ --sort=-committerdate \ --format="%(objectname:short) %(committerdate:relative) %(refname)" \ refs/heads \ | head -n $count \ | sed -e 's/refs\/heads\///' } __git-recent-branches $@ ================================================ FILE: bin/git-refresh-branch ================================================ #!/usr/bin/env perl use Carp (); use List::Util qw(reduce); sub main { my ($rollback_ref) = @_; Carp::croak 'rollback_ref must be given' unless $rollback_ref; my $current_branch = do { my $out = `git symbolic-ref --short HEAD`; chomp $out; $out; }; my $old_branch_name = old_branch_name($current_branch); seq_run( ['git', 'branch', '-m', $current_branch, $old_branch_name], ['git', 'checkout', '-b', $current_branch, $rollback_ref], ); } sub old_branch_name { my ($name) = @_; my $time = time(); return "prev-$time-$name"; } sub seq_run { return List::Util::reduce { my ($last_result, $cmd) = ($a, $b); $last_result == 0 ? run($cmd) : $last_result; } 0, @_; } sub run { my ($cmd) = @_; my $line = join ' ', @$cmd; Carp::carp $line; return system @$cmd; } main(@ARGV); ================================================ FILE: bin/git-run ================================================ #!/bin/bash # originally written at https://fujimura.hatenablog.com/entry/2018/03/30/181715 set -e git-check-dirty eval $@ git add -A git commit --edit --verbose --message "$(echo $@)" ================================================ FILE: bin/git-topic-rebase ================================================ #!/usr/bin/env zsh # $1: merge base set -e git rebase --interactive $(git merge-base ${1:-master} HEAD) ================================================ FILE: bin/git-up ================================================ #!/usr/bin/env zsh # $1: remote name (default: origin) # $2: branch name (default: HEAD) set -e git push --set-upstream "${1:-origin}" $(git symbolic-ref --short ${2:-HEAD}) ================================================ FILE: bin/macvim ================================================ #!/bin/bash set -ue macvim_wrapper_cmd='reattach-to-user-namespace -l' macvim_app="${MACVIM_APP-/Applications/MacVim.app}" if [[ ! -e $macvim_app ]]; then echo "! MACVIM_APP (${MACVIM_APP} not found)" >/dev/stderr exit 1 fi reattach-to-user-namespace -l "$macvim_app/Contents/MacOS/Vim" "$@" ================================================ FILE: bin/man ================================================ #!/bin/sh env \ LESS_TERMCAP_mb=$'\E[01;31m' \ LESS_TERMCAP_md=$'\E[01;38;5;74m' \ LESS_TERMCAP_me=$'\E[0m' \ LESS_TERMCAP_se=$'\E[0m' \ LESS_TERMCAP_so=$'\E[38;5;246m' \ LESS_TERMCAP_ue=$'\E[0m' \ LESS_TERMCAP_us=$'\E[04;38;5;146m' \ /usr/bin/man "$@" ================================================ FILE: bin/metacpan ================================================ #!/usr/bin/env zsh open_command='' open_args='' if /usr/bin/which -s open; then open_command='open' open_args='' fi if [[ ! -x =$open_command ]]; then echo "open-able command is not found." > /dev/stderr exit 1 fi $open_command $open_args "http://metacpan.org/module/$1" ================================================ FILE: bin/mkproj ================================================ #!/usr/bin/env zsh set -ue _script_name=$(basename $0) usage() { cat </dev/stderr exit 1 } info() { echo "---> $@" >/dev/stderr } repos_root="$(ghq root)" repo_host="github.com" owner="$USER" name='' create=1 peek=1 while [[ $# > 0 ]]; do case "$1" in --help,-h) usage exit 0 ;; --host) shift repo_host="$1" ;; --owner) shift owner="$1" ;; --design) create=0 ;; --no-peek) peek=0 ;; -*) echo "Unknown args: $1" exit 1 ;; *) name="$1" ;; esac shift done owner_path="${repos_root}/${repo_host}/${owner}" repo_path="${owner_path}/${name}" if [[ -z "$name" ]]; then die 'Repository name cannot be empty' fi if [[ $create -eq 1 ]]; then if [[ -e $repo_path ]]; then die "Already exists: $repo_path" fi info "Create $repo_path" mkdir -p $repo_path fi cd $repo_path if [[ ! -d "${repo_path}/.git" ]]; then info 'Try to git init ...' git init git commit --allow-empty --message ':sunrise:' fi if [[ $peek -eq 1 ]]; then info "cd $repo_path ..." exec $SHELL fi ================================================ FILE: bin/os-version ================================================ #!/bin/bash case "$(uname)" in Darwin*) sw_vers -productVersion ;; Linux*) if which lsb_release >/dev/null 2>&1; then lsb_release --release | cut -f2 fi if [[ -f /etc/redhat-release ]]; then cat /etc/redhat-release | cut -d' ' -f3 fi ;; *) echo "Unknown OS" >/dev/stderr exit 1 esac ================================================ FILE: bin/paginate ================================================ #!/bin/bash ${PAGER-less} ================================================ FILE: bin/pm-version ================================================ #!/bin/sh perl -M"$1" -e "print qq|\$$1::VERSION\n|" ================================================ FILE: bin/screenshot2slack ================================================ #!/bin/bash set -e tmp_dir='/tmp' format='png' file_name="${tmp_dir}/$(date +%s).${format}" screencapture -i "${file_name}" slackcat $@ "${file_name}" ================================================ FILE: bin/ts-project ================================================ #!/bin/bash set -e usage() { _script_name=$(basename $0) cat < 0 ]]; do case "$1" in --help) usage exit 0 ;; --with-mocha) with_mocha=1 ;; --with-espower-babel) with_espower_babel=1 ;; esac shift done json_satisfy() { jq --exit-status "$2" < $1 >/dev/null } pkg_satisfy() { json_satisfy ${root_dir}/package.json "$1" } update_json() { cat "$1" | jq --unbuffered "$2" | tee "$1" } if [[ ! -d "${root_dir}/.git" ]]; then echo '---> Not Git repository' echo '---> Try to git init ...' git init git commit --allow-empty --message ':sunrise:' fi if [[ ! -f "${root_dir}/package.json" ]]; then echo '---> npm init ...' npm init --yes fi if ! git check-ignore --quiet 'node_modules'; then echo '---> Ignore node_modules ...' echo 'node_modules' >> .gitignore fi if ! pkg_satisfy '.devDependencies | has("typescript")'; then echo '---> Install TypeScript ...' npm install --save-dev typescript fi if [[ $with_mocha -eq 1 ]]; then if ! pkg_satisfy '.devDependencies | has("mocha")'; then echo '---> Install mocha ...' npm install --save-dev mocha fi npm_test_command='mocha' if [[ $with_espower_babel -eq 1 ]]; then if ! pkg_satisfy '.devDependencies | has("espower-babel")'; then echo '---> Install espower-babel ...' npm install --save-dev espower-babel fi npm_test_command='mocha --compilers js:espower-babel/guess' fi if ! pkg_satisfy ".scripts.test == \"${npm_test_command}\""; then echo '---> configure `npm test` ...' update_json "${root_dir}/package.json" "map_values(if type == \"object\" and has(\"test\") then .test = \"${npm_test_command}\" else . end)" fi fi if [[ ! -f "${root_dir}/tsconfig.json" ]]; then echo '---> Create tsconfig.json ...' $(npm bin)/tsc --init fi if ! json_satisfy ${root_dir}/tsconfig.json '.compilerOptions.target == "es5"'; then echo '---> Set target version to ES5 ...' update_json "${root_dir}/tsconfig.json" 'map_values(if type == "object" and has("target") then .target = "es5" else . end)' fi if ! json_satisfy ${root_dir}/tsconfig.json '.compilerOptions.noImplicitAny == true'; then echo '---> Refuse implicit any ...' update_json "${root_dir}/tsconfig.json" 'map_values(if type == "object" and has("noImplicitAny") then .noImplicitAny = true else . end)' fi if ! pkg_satisfy '.scripts.build == "tsc"'; then echo '---> Configure npm run build' update_json "${root_dir}/package.json" 'map_values(if type == "object" and has("test") then .build = "tsc" else . end)' fi if ! pkg_satisfy '.devDependencies | has("dtsm")'; then echo '---> Install dtsm ...' npm install --save-dev dtsm fi if [[ ! -f "${root_dir}/dtsm.json" ]]; then echo '---> Generate dtsm.json' $(npm bin)/dtsm --insight false init fi if ! git check-ignore --quiet 'typings'; then echo '---> Ignore typings ...' echo 'typings' >> .gitignore fi ================================================ FILE: colors/Japanesque/Japanesque.itermcolors ================================================ Ansi 0 Color Blue Component 0.20856963098049164 Green Component 0.22283002734184265 Red Component 0.20568123459815979 Ansi 1 Color Blue Component 0.38021323084831238 Green Component 0.24660280346870422 Red Component 0.81089001893997192 Ansi 10 Color Blue Component 0.17100538313388824 Green Component 0.49610027670860291 Red Component 0.46425256133079529 Ansi 11 Color Blue Component 0.1833186000585556 Green Component 0.35025951266288757 Red Component 0.46875584125518799 Ansi 12 Color Blue Component 0.47479093074798584 Green Component 0.34725069999694824 Red Component 0.074933364987373352 Ansi 13 Color Blue Component 0.56739711761474609 Green Component 0.25756442546844482 Red Component 0.37626489996910095 Ansi 14 Color Blue Component 0.79221165180206299 Green Component 0.73511248826980591 Red Component 0.46331635117530823 Ansi 15 Color Blue Component 0.68263441324234009 Green Component 0.71090340614318848 Red Component 0.6965288519859314 Ansi 2 Color Blue Component 0.35710996389389038 Green Component 0.71854472160339355 Red Component 0.48304364085197449 Ansi 3 Color Blue Component 0.16496320068836212 Green Component 0.70341014862060547 Red Component 0.91225624084472656 Ansi 4 Color Blue Component 0.82943236827850342 Green Component 0.60329484939575195 Red Component 0.29914027452468872 Ansi 5 Color Blue Component 0.76894307136535645 Green Component 0.49908417463302612 Red Component 0.64749133586883545 Ansi 6 Color Blue Component 0.67739421129226685 Green Component 0.60572487115859985 Red Component 0.22138151526451111 Ansi 7 Color Blue Component 0.96549803018569946 Green Component 0.98070180416107178 Red Component 0.98026049137115479 Ansi 8 Color Blue Component 0.34851333498954773 Green Component 0.3565424382686615 Red Component 0.34871619939804077 Ansi 9 Color Blue Component 0.651419997215271 Green Component 0.55888265371322632 Red Component 0.81987529993057251 Background Color Blue Component 0.11759774386882782 Green Component 0.11759574711322784 Red Component 0.11759926378726959 Bold Color Blue Component 0.98028081655502319 Green Component 1 Red Component 1 Cursor Color Blue Component 0.31030187010765076 Green Component 0.81186991930007935 Red Component 0.92885816097259521 Cursor Text Color Blue Component 0.20856963098049164 Green Component 0.22283002734184265 Red Component 0.20568123459815979 Foreground Color Blue Component 0.9264865517616272 Green Component 0.96665072441101074 Red Component 0.97033727169036865 Selected Text Color Blue Component 0.9264865517616272 Green Component 0.96665072441101074 Red Component 0.97033727169036865 Selection Color Blue Component 0.46659797430038452 Green Component 0.34349527955055237 Red Component 0.089366093277931213 ================================================ FILE: colors/Japanesque/README.markdown ================================================ # Japanesque ![The image of Japanesque on iTerm 2](http://cdn-ak.f.st-hatena.com/images/fotolife/a/aereal/20130102/20130102224938.png) Japanesque is colorscheme featured Japanese traditional colors. ## Supported Applications * [iTerm 2](http://iterm2.com/) ## Author aereal (aereal@aerael.org) ## License The MIT License (MIT) Copyright © 2013 aereal, aereal.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: osx/defaults/alfred.bash ================================================ #!/usr/bin/env bash defaults write com.alfredapp.Alfred appearance.hideStatusBarIcon -bool true defaults write com.alfredapp.Alfred appearance.hidePreferencesCogIcon -bool true defaults write com.alfredapp.Alfred appearance.hideHat -bool true defaults write com.alfredapp.Alfred system.eject -bool true ================================================ FILE: osx/defaults/config.bash ================================================ #!/usr/bin/env bash # Dock {{{ defaults write com.apple.dock autohide -bool true defaults write com.apple.dock autohide-delay -float 0 defaults write com.apple.dock mineffect scale defaults write com.apple.dock minimize-to-application -bool true defaults write com.apple.dock showhidden -bool true defaults write com.apple.dock no-glass -bool true defaults write com.apple.dock magnification -bool true defaults write com.apple.dock mouse-over-hilite-stack -bool true defaults write com.apple.dock show-process-indicator -bool false defaults write com.apple.dock dashboard-in-overlay -bool true defaults write com.apple.dock expose-animation-duration -float 0.1 defaults write com.apple.dashboard mcx-disabled -bool true # }}} # Time Machine {{{ defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true sudo tmutil disablelocal # }}} # Appearance {{{ defaults write -g AppleAquaColorVariant -int 6 # Graphite defaults write -g AppleEnableMenuBarTransparency -bool false defaults write -g AppleShowScrollBars -string 'Automatic' # }}} # Finder {{{ defaults write -g AppleShowAllExtensions -bool true defaults write com.apple.finder FXDefaultSearchScope -string 'SCcf' defaults write com.apple.finder QLEnableXRayFolders -bool true defaults write com.apple.finder DisableAllAnimations -bool true defaults write com.apple.finder AppleShowAllFiles -bool true defaults write com.apple.finder ShowStatusBar -bool true defaults write com.apple.finder ShowPathbar -bool true defaults write com.apple.finder FXPreferredViewStyle -string "Nslv" defaults write -g NSNavPanelExpandedStateForSaveMode -bool true defaults write com.apple.LaunchServices LSQuarantine -bool false defaults write com.apple.finder FXEnableExtensionChangeWarning -bool true # }}} # Screen Saver {{{ defaults write com.apple.screensaver askForPassword -int 1 defaults write com.apple.screensaver askForPasswordDelay -int 0 # }}} # Trackpad {{{ defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad DragLock -bool true # }}} # Activity Monitor.app {{{ defaults write com.apple.ActivityMonitor IconType -int 4 # }}} # App Store {{{ defaults write com.apple.appstore ShowDebugMenu -bool true # }}} defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false defaults write com.apple.frameworks.diskimages skip-verify -bool true defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true # Enable full-keyboard access (enable tab-key to focus all UI control items) defaults write -g AppleKeyboardUIMode -int 3 defaults write -g com.apple.keyboard.fnState -bool true defaults write -g NSQuitAlwaysKeepsWindows -bool false # Huge moust pointer defaults write com.apple.universalaccess mouseDriverCursorSize -int 4 # http://www.defaults-write.com/increase-the-speed-of-os-x-dialogs-boxes/#.UfSW3GSsgy4 defaults write -g NSWindowResizeTime -float 0.001 # Save to disk (not to iCloud) defaults write -g NSDocumentSaveNewDocumentsToCloud -bool false # Disable standby mode sudo pmset -a standbydelay 86400 # 24 hours ================================================ FILE: osx/keyremap4macbook/config.sh ================================================ #!/bin/sh cli=/Applications/KeyRemap4MacBook.app/Contents/Applications/KeyRemap4MacBook_cli.app/Contents/MacOS/KeyRemap4MacBook_cli $cli set org.aereal.sequel-pro.remap-c-h-to-delete 1 /bin/echo -n . $cli set repeat.initial_wait 200 /bin/echo -n . $cli set org.aereal.limechat.move-to-previous-unread-channel 1 /bin/echo -n . $cli set remap.space2shiftL_space_keyrepeat 1 /bin/echo -n . $cli set org.aereal.limechat.move-down-channel 1 /bin/echo -n . $cli set option.emacsmode_controlM 1 /bin/echo -n . $cli set repeat.wait 35 /bin/echo -n . $cli set org.aereal.limechat.move-up-channel 1 /bin/echo -n . $cli set remap.swapcolons 1 /bin/echo -n . $cli set org.aereal.limechat.move-to-next-unread-channel 1 /bin/echo -n . /bin/echo ================================================ FILE: osx/keyremap4macbook/private.xml ================================================ TERMINAL com.googlecode.iterm2 SEQUELPRO com.sequelpro.SequelPro LIMECHAT net.limechat.LimeChat net.limechat.LimeChat-AppStore LimeChat Move up active channel org.aereal.limechat.move-up-channel LIMECHAT --KeyToKey-- KeyCode::K, VK_COMMAND, KeyCode::CURSOR_UP, VK_COMMAND Move down active channel org.aereal.limechat.move-down-channel LIMECHAT --KeyToKey-- KeyCode::J, VK_COMMAND, KeyCode::CURSOR_DOWN, VK_COMMAND Move to previous unread channel org.aereal.limechat.move-to-previous-unread-channel LIMECHAT --KeyToKey-- KeyCode::J, VK_COMMAND | VK_SHIFT, KeyCode::CURSOR_UP, VK_CONTROL | VK_SHIFT Move to next unread channel org.aereal.limechat.move-to-next-unread-channel LIMECHAT --KeyToKey-- KeyCode::K, VK_COMMAND | VK_SHIFT, KeyCode::CURSOR_DOWN, VK_CONTROL | VK_SHIFT Sequal Pro Remap C-h to DELETE org.aereal.sequel-pro.remap-c-h-to-delete SEQUELPRO --KeyToKey-- KeyCode::H, VK_CONTROL, KeyCode::DELETE Japanese IME Option_L to EISUU org.aereal.remap-option-l-to-kana-eisuu --KeyOverlaidModifier-- KeyCode::OPTION_L, KeyCode::OPTION_L, KeyCode::JIS_EISUU Option_R to KANA org.aereal.remap-option-r-to-kana-eisuu --KeyOverlaidModifier-- KeyCode::OPTION_R, KeyCode::OPTION_R, KeyCode::JIS_KANA tmux integration Double-tap Command_R to tmux prefix key on Terminal application org.aereal.double-tap-command-r-to-tmux-prefix-key TERMINAL --DoublePressModifier-- KeyCode::COMMAND_R, KeyCode::COMMAND_R, KeyCode::K, ModifierFlag::CONTROL_L Cmd-T to [prefix]-c Create a new window TERMINAL org.aereal.command-t-to-prefix-c --KeyToKey-- KeyCode::T, VK_COMMAND, KeyCode::K, VK_CONTROL, KeyCode::C Cmd-W to [prefix]-k Kill the window TERMINAL org.aereal.tmux.command-w-to-prefix-k --KeyToKey-- KeyCode::W, VK_COMMAND, KeyCode::K, VK_CONTROL, KeyCode::K Move the window (Next) TERMINAL org.aereal.tmux.move-the-window-next --KeyToKey-- KeyCode::BRACKET_RIGHT, VK_COMMAND | VK_SHIFT, KeyCode::K, VK_CONTROL, KeyCode::N Move the window (Previous) TERMINAL org.aereal.tmux.move-the-window-previous --KeyToKey-- KeyCode::BRACKET_LEFT, VK_COMMAND | VK_SHIFT, KeyCode::K, VK_CONTROL, KeyCode::P ================================================ FILE: test/Gemfile ================================================ source 'https://rubygems.org/' gem 'minitest-spec' gem 'rake' ================================================ FILE: test/dotfiles_test.rb ================================================ require 'pathname' require 'minitest/autorun' require 'minitest/spec' require 'yaml' HOME = Pathname.new(ENV.fetch('HOME')) PROJECT_DIR = Pathname.new(__FILE__).expand_path.parent.parent SOURCE_DIR = PROJECT_DIR DEST_DIR = Pathname.new(ENV.fetch('DOTFILES_INSTALL_DIR', HOME)) CONFIG = YAML.load_file(PROJECT_DIR + '.dotfiles.yml') DOTFILES = CONFIG['dotfiles'] DOTFILES_MAP = DOTFILES.map {|f| { basename: f, source: SOURCE_DIR + f, dest: DEST_DIR + f } } DOTFILES_MAP.each do |dotfile| describe dotfile[:basename] do it "is symlink to source" do source = dotfile[:source] dest = dotfile[:dest] dest.symlink?.must_equal(true) dest.readlink.must_equal(source) end end end