├── init.vim ├── ftplugin ├── sh.vim ├── vim.vim ├── asm.vim ├── c.vim ├── cpp.vim ├── make.vim ├── help.vim ├── git.vim ├── netrw.vim ├── dirvish.vim └── ruby.vim ├── indent ├── c.vim ├── cpp.vim ├── make.vim ├── sh.vim └── java.vim ├── syntax ├── gitcommit.vim ├── c.vim └── tmux.vim ├── ftdetect ├── md.vim ├── geojson.vim ├── ssh.vim └── tmux.vim ├── colors ├── brookstream.vim ├── colorscheme_template.vim ├── grb256.vim ├── mustang.vim ├── osx_like.vim ├── mustangblue.vim ├── pyte.vim ├── vylight.vim ├── blueshift.vim ├── crayon.vim ├── blackboard2.vim ├── darkocean.vim ├── bboard.vim ├── stingray.vim ├── darkdot.vim ├── ekvoli.vim ├── eclipse.vim ├── tir_black.vim ├── github.vim ├── ironman.vim ├── xoria256.vim ├── smyckblue.vim ├── gitboard2.vim ├── gitboard.vim ├── smyck.vim ├── felt.vim ├── old-ion.vim ├── muon.vim ├── blueboardreborn.vim ├── blueboard.vim ├── blueboard6.vim ├── corporation.vim ├── blueboard2.vim └── blueboard3.vim ├── .gitignore ├── after ├── plugin │ └── keybindings.vim ├── ftplugin │ ├── dirvish.vim │ ├── vim.vim │ └── qf.vim └── syntax │ ├── sh.vim │ └── readline.vim ├── init ├── filetype.vim ├── commands.vim ├── plug_opts.vim ├── run_specs.vim ├── autocmd.vim ├── projectionist.vim ├── colorscheme.vim ├── netrw.vim ├── wild.vim ├── zoomwin.vim ├── search.vim ├── cursor.vim ├── transient-keys.vim ├── statusline.vim ├── terminal.vim ├── options.vim └── functions.vim ├── autoload ├── bufwin.vim ├── dotvim.vim ├── encoding.vim ├── specsetup.vim ├── transposition.vim ├── optcycle.vim └── statusline.vim ├── plugshot ├── vimrc └── compiler └── nodelint.vim /init.vim: -------------------------------------------------------------------------------- 1 | vimrc -------------------------------------------------------------------------------- /ftplugin/sh.vim: -------------------------------------------------------------------------------- 1 | setl foldmethod=syntax 2 | -------------------------------------------------------------------------------- /ftplugin/vim.vim: -------------------------------------------------------------------------------- 1 | setl foldmethod=marker 2 | -------------------------------------------------------------------------------- /indent/c.vim: -------------------------------------------------------------------------------- 1 | setl ts=4 sts=4 sw=4 noet 2 | 3 | -------------------------------------------------------------------------------- /indent/cpp.vim: -------------------------------------------------------------------------------- 1 | setl ts=4 sts=4 sw=4 noet 2 | 3 | -------------------------------------------------------------------------------- /indent/make.vim: -------------------------------------------------------------------------------- 1 | setl ts=4 sts=4 sw=4 noet 2 | 3 | -------------------------------------------------------------------------------- /syntax/gitcommit.vim: -------------------------------------------------------------------------------- 1 | hi link gitcommitSummary Title 2 | -------------------------------------------------------------------------------- /ftdetect/md.vim: -------------------------------------------------------------------------------- 1 | au Bufread,BufNewFile *.md setfiletype markdown 2 | -------------------------------------------------------------------------------- /ftdetect/geojson.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead *.geojson setfiletype json 2 | -------------------------------------------------------------------------------- /ftplugin/asm.vim: -------------------------------------------------------------------------------- 1 | setl listchars-=tab:▸\ 2 | setl listchars+=tab:\ \ 3 | -------------------------------------------------------------------------------- /ftplugin/c.vim: -------------------------------------------------------------------------------- 1 | setl listchars-=tab:▸\ 2 | setl listchars+=tab:\ \ 3 | -------------------------------------------------------------------------------- /ftplugin/cpp.vim: -------------------------------------------------------------------------------- 1 | setl listchars-=tab:▸\ 2 | setl listchars+=tab:\ \ 3 | -------------------------------------------------------------------------------- /ftdetect/ssh.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead */ssh/config setfiletype sshconfig 2 | -------------------------------------------------------------------------------- /ftplugin/make.vim: -------------------------------------------------------------------------------- 1 | setl listchars-=tab:▸\ 2 | setl listchars+=tab:\ \ 3 | -------------------------------------------------------------------------------- /indent/sh.vim: -------------------------------------------------------------------------------- 1 | setl tabstop=2 2 | setl softtabstop=2 3 | setl shiftwidth=2 4 | -------------------------------------------------------------------------------- /ftplugin/help.vim: -------------------------------------------------------------------------------- 1 | nnoremap q :call bufwin#quit_window() 2 | -------------------------------------------------------------------------------- /indent/java.vim: -------------------------------------------------------------------------------- 1 | setl tabstop=4 2 | setl softtabstop=4 3 | setl shiftwidth=4 4 | -------------------------------------------------------------------------------- /ftdetect/tmux.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead .tmux*.conf*,tmux*.conf* setfiletype tmux 2 | -------------------------------------------------------------------------------- /colors/brookstream.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivanbrennan/dotvim/HEAD/colors/brookstream.vim -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | backup/ 2 | plugged/ 3 | tmp/ 4 | undo/ 5 | view/ 6 | .netrwhist 7 | info 8 | vimrc.local 9 | -------------------------------------------------------------------------------- /after/plugin/keybindings.vim: -------------------------------------------------------------------------------- 1 | " here be any keybindings that need to be set _after_ plugins have loaded 2 | -------------------------------------------------------------------------------- /ftplugin/git.vim: -------------------------------------------------------------------------------- 1 | if expand('%:p') =~# '^fugitive:[\\/][\\/]' 2 | nnoremap q :bdelete 3 | endif 4 | -------------------------------------------------------------------------------- /ftplugin/netrw.vim: -------------------------------------------------------------------------------- 1 | nmap u (dirvish_up) 2 | nnoremap q :call bufwin#quit_window() 3 | -------------------------------------------------------------------------------- /after/ftplugin/dirvish.vim: -------------------------------------------------------------------------------- 1 | nnoremap p yy:vertical pedit +vertical\ resize\ =round(&columns * 7 / 9.0) =fnameescape(getreg('"',1,1)[0]) 2 | -------------------------------------------------------------------------------- /init/filetype.vim: -------------------------------------------------------------------------------- 1 | " sh 2 | let g:is_bash=1 3 | let g:sh_fold_enabled=1 " functions 4 | 5 | " vim 6 | let g:vimsyn_folding = "f" " functions 7 | let g:vimsyn_noerror = 1 " vim.vim sometimes gets it wrong 8 | -------------------------------------------------------------------------------- /init/commands.vim: -------------------------------------------------------------------------------- 1 | command! -bang Let call RSpecLet('') 2 | 3 | command! DotVimReload source $MYVIMRC | filetype detect 4 | command! -complete=customlist,dotvim#list -nargs=? DotVim call dotvim#edit() 5 | -------------------------------------------------------------------------------- /init/plug_opts.vim: -------------------------------------------------------------------------------- 1 | let g:vimrubocop_keymap = 0 2 | 3 | let g:python_host_prog = '/usr/local/bin/python2' 4 | let g:python3_host_prog = '/usr/local/bin/python3' 5 | 6 | let g:dirvish_mode = ':sort r /[^\/]$/' 7 | -------------------------------------------------------------------------------- /init/run_specs.vim: -------------------------------------------------------------------------------- 1 | " vim-spec-runner 2 | let g:spec_runner_dispatcher = "silent !echo clear > test_commands && echo {command} > test_commands" 3 | 4 | " vim-tmux-runner 5 | let g:VtrOrientation = "v" 6 | let g:VtrPercentage = 25 7 | 8 | -------------------------------------------------------------------------------- /syntax/c.vim: -------------------------------------------------------------------------------- 1 | " Highlight Class and Function names 2 | syntax match cCustomFunc /\w\+\s*(/me=e-1,he=e-1 3 | highlight def link cCustomFunc Function 4 | 5 | if !exists("c_no_c99") " ISO C99 6 | syn keyword cBoolean true false 7 | endif 8 | -------------------------------------------------------------------------------- /init/autocmd.vim: -------------------------------------------------------------------------------- 1 | " git 2 | augroup GitGroup 3 | autocmd! 4 | au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0]) 5 | augroup END 6 | 7 | " preview 8 | augroup Preview 9 | autocmd! 10 | autocmd BufWinEnter * if &previewwindow | nnoremap q q| endif 11 | augroup END 12 | -------------------------------------------------------------------------------- /after/syntax/sh.vim: -------------------------------------------------------------------------------- 1 | " Recognize functions nested within an { expression-group; } 2 | syn cluster shExprList2 add=shFunctionOne,shFunctionTwo,shFunctionThree,shFunctionFour 3 | 4 | " Allow { expression-group; } to fold 5 | syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shSpecialNxt fold 6 | -------------------------------------------------------------------------------- /init/projectionist.vim: -------------------------------------------------------------------------------- 1 | let g:projectionist_heuristics = { 2 | \ '*': { 3 | \ '*.c': { 4 | \ 'alternate': '{}.h', 5 | \ 'type': 'source' 6 | \ }, 7 | \ '*.h': { 8 | \ 'alternate': '{}.c', 9 | \ 'type': 'header' 10 | \ } 11 | \ } 12 | \ } 13 | -------------------------------------------------------------------------------- /autoload/bufwin.vim: -------------------------------------------------------------------------------- 1 | func! bufwin#quit_window() 2 | if winnr('$') > 1 3 | close 4 | else 5 | call s:switch_buffer_or_quit() 6 | endif 7 | endf 8 | 9 | func! s:switch_buffer_or_quit() 10 | let l:alt_bufnr = bufnr('#') 11 | 12 | if l:alt_bufnr != -1 13 | execute 'buffer' l:alt_bufnr 14 | else 15 | quit 16 | endif 17 | endf 18 | -------------------------------------------------------------------------------- /init/colorscheme.vim: -------------------------------------------------------------------------------- 1 | " ::::::::: Colors :::::::::::::::::::::::: 2 | 3 | if has('termguicolors') 4 | set termguicolors 5 | endif 6 | 7 | let g:nord_italic_comments = 1 8 | 9 | if !exists('g:colors_name') 10 | if $THEME == 'light' 11 | colorscheme blight 12 | else 13 | try 14 | colorscheme nord 15 | catch /^Vim\%((\a\+)\)\=:E185/ 16 | colorscheme ion 17 | endtry 18 | endif 19 | endif 20 | -------------------------------------------------------------------------------- /after/ftplugin/vim.vim: -------------------------------------------------------------------------------- 1 | setl iskeyword-=# 2 | 3 | nmap (ArticulateTag) :exe v:count1."tag =Vimcword()" 4 | nmap (ArticulateTjump) :tjump =Vimcword() 5 | 6 | func! Vimcword() 7 | let l:orig=&l:iskeyword 8 | setlocal iskeyword+=# 9 | 10 | let l:cword=expand('') 11 | 12 | let &l:iskeyword=l:orig 13 | return l:cword 14 | endf 15 | -------------------------------------------------------------------------------- /autoload/dotvim.vim: -------------------------------------------------------------------------------- 1 | let s:vimrc = resolve($MYVIMRC) 2 | let s:vimrc_dir = fnamemodify(s:vimrc, ':h') 3 | 4 | func! dotvim#edit(...) 5 | execute 'edit' (a:0 ? dotvim#path(a:1) : s:vimrc) 6 | endf 7 | 8 | func! dotvim#path(subpath) 9 | return s:vimrc_dir . '/' . a:subpath 10 | endf 11 | 12 | func! dotvim#list(arglead, _cmdline, _cursorpos) 13 | return map(globpath(s:vimrc_dir, a:arglead.'*', 0, 1), s:relative_path) 14 | endf 15 | 16 | let s:relative_path = { _idx, val -> fnamemodify(val,':p')[(s:prefix_len):] } 17 | let s:prefix_len = len(s:vimrc_dir) + 1 18 | -------------------------------------------------------------------------------- /autoload/encoding.vim: -------------------------------------------------------------------------------- 1 | " Functions for working with multibyte strings. 2 | " Adapted from https://github.com/LucHermitte/lh-vim-lib 3 | 4 | func! encoding#previous_char(line, col) abort 5 | return matchstr(a:line, '.\%'.a:col.'c') 6 | endf 7 | 8 | func! encoding#pre_previous_char(line, col) abort 9 | return matchstr(a:line, '.\ze.\%'.a:col.'c') 10 | endf 11 | 12 | func! encoding#char(line, col) abort 13 | return matchstr(a:line, '\%'.a:col.'c.') 14 | endf 15 | 16 | func! encoding#first_nonblankp(line, col) abort 17 | return match(a:line, '^\s*\%'.a:col.'c\S') >= 0 18 | endf 19 | -------------------------------------------------------------------------------- /autoload/specsetup.vim: -------------------------------------------------------------------------------- 1 | func! specsetup#Vmux() 2 | VmuxPrimary 3 | let g:spec_runner_dispatcher = "call system(\"tmux send -t " . g:vmux_primary . " C-L '{command}' ENTER\")" 4 | endf 5 | 6 | func! specsetup#Vtux() 7 | let g:spec_runner_dispatcher = "VtrSendCommand! {command}" 8 | echo 'g:spec_runner_dispatcher = "' . g:spec_runner_dispatcher . '"' 9 | endf 10 | 11 | func! specsetup#Fifo() 12 | let g:spec_runner_dispatcher = "silent !echo clear > test_commands && echo {command} > test_commands" 13 | echo 'g:spec_runner_dispatcher = "' . g:spec_runner_dispatcher . '"' 14 | endf 15 | -------------------------------------------------------------------------------- /init/netrw.vim: -------------------------------------------------------------------------------- 1 | " don't need it. using dirvish 2 | let g:loaded_netrwPlugin = 1 3 | 4 | " Netrw & Vinegar 5 | let g:netrw_list_hide='\(^\|\s\s\)\zs\.\S\+' 6 | let g:netrw_hide=1 " hide hidden files 7 | let g:netrw_dirhistmax=100 " keep more history 8 | let g:netrw_altfile=1 " last edited file '#' 9 | let g:netrw_liststyle=0 " thin 10 | let g:netrw_alto=0 " open files on right 11 | let g:netrw_winsize=20 " preview winsize 12 | let g:netrw_preview=1 " open previews vertically 13 | let g:netrw_use_errorwindow=0 " suppress error window 14 | 15 | -------------------------------------------------------------------------------- /init/wild.vim: -------------------------------------------------------------------------------- 1 | " ::::::::: Wild :::::::::::::::::::::::::: 2 | 3 | set wildmode=list:longest,full 4 | 5 | " output and VCS 6 | set wildignore+=*.o,*.out,*.obj,*.rbc,*.rbo,*.class,.svn,*.gem 7 | " archives 8 | set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz 9 | " gems and sass 10 | set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.sass-cache/* 11 | " librarian-chef, vagrant, test-kitchen and Berkshelf 12 | set wildignore+=*/tmp/librarian/*,*/.vagrant/*,*/.kitchen/*,*/vendor/cookbooks/* 13 | " rails temporary asset caches 14 | set wildignore+=*/tmp/cache/assets/*/sprockets/*,*/tmp/cache/assets/*/sass/* 15 | " temp and backup files 16 | set wildignore+=*.swp,*~,._* 17 | " OSX bullshit 18 | set wildignore+=*.DS_Store 19 | 20 | set wildignorecase 21 | 22 | -------------------------------------------------------------------------------- /after/ftplugin/qf.vim: -------------------------------------------------------------------------------- 1 | if exists('w:quickfix_title') 2 | " Adjust quickfix statusline to show the command that was run and total line count: 3 | setl statusline=\ " space 4 | setl statusline+=%3* " italics 5 | setl statusline+=%{w:quickfix_title} 6 | setl statusline+=%* " reset highlight group 7 | setl statusline+=\ " space 8 | setl statusline+=%= " separator 9 | setl statusline+=%l " line 10 | setl statusline+=%#StatusLineNC# " dim 11 | setl statusline+=/ " literal '/' 12 | setl statusline+=%* " reset highlight group 13 | setl statusline+=%L " total lines 14 | setl statusline+=\ " space 15 | endif 16 | 17 | setl colorcolumn="" 18 | -------------------------------------------------------------------------------- /ftplugin/dirvish.vim: -------------------------------------------------------------------------------- 1 | " reset this even if reloading 2 | let b:show_hidden_files = 1 3 | 4 | " finish here if reloading 5 | if exists('b:loaded_user_ftplugin') 6 | finish 7 | endif 8 | let b:loaded_user_ftplugin = 1 9 | 10 | setlocal nonumber 11 | 12 | nmap u (dirvish_up) 13 | nmap m 14 | 15 | " I should move the u mapping (dirvish_up) to a submode, then I could preserve 16 | " u for undo in normal mode and won't need the below mapping 17 | nnoremap u 18 | 19 | nnoremap h :silent call ToggleHiddenFiles() 20 | 21 | func! s:ToggleHiddenFiles() 22 | let save_cursor = getcurpos() 23 | 24 | if b:show_hidden_files 25 | keeppatterns g@\v/\.[^\/]+/?$@d 26 | let b:show_hidden_files = 0 27 | else 28 | Dirvish % 29 | let b:show_hidden_files = 1 30 | endif 31 | 32 | call setpos('.', save_cursor) 33 | endf 34 | -------------------------------------------------------------------------------- /init/zoomwin.vim: -------------------------------------------------------------------------------- 1 | if has('nvim') 2 | " removed 'key', 'oft', 'sn', 'tx' options which do not work with nvim 3 | let g:zoomwin_localoptlist = [ 4 | \ "ai","ar", 5 | \ "bh","bin","bl","bomb","bt", 6 | \ "cfu","ci","cin","cink","cino","cinw","cms","com","cpt", 7 | \ "diff", 8 | \ "efm","eol","ep","et", 9 | \ "fenc","fex","ff","flp","fo","ft", 10 | \ "gp", 11 | \ "imi","ims","inde","inex","indk","inf","isk", 12 | \ "kmp", 13 | \ "lisp", 14 | \ "mps","ml","ma","mod", 15 | \ "nf", 16 | \ "ofu", 17 | \ "pi", 18 | \ "qe", 19 | \ "ro", 20 | \ "sw","si","sts","spc","spf","spl","sua","swf","smc","syn", 21 | \ "ts","tw", 22 | \ "udf", 23 | \ "wfh","wfw","wm" 24 | \] 25 | endif 26 | -------------------------------------------------------------------------------- /after/syntax/readline.vim: -------------------------------------------------------------------------------- 1 | syn keyword readlineVariable contained 2 | \ nextgroup=readlineBoolean 3 | \ skipwhite 4 | \ blink-matching-paren 5 | \ colored-completion-prefix 6 | \ colored-stats 7 | \ enable-bracketed-paste 8 | \ show-mode-in-prompt 9 | 10 | syn keyword readlineVariable contained 11 | \ nextgroup=readlineString 12 | \ skipwhite 13 | \ emacs-mode-string 14 | \ vi-cmd-mode-string 15 | \ vi-ins-mode-string 16 | 17 | syn keyword readlineVariable contained 18 | \ nextgroup=readlineNumber 19 | \ skipwhite 20 | \ keyseq-timeout 21 | -------------------------------------------------------------------------------- /ftplugin/ruby.vim: -------------------------------------------------------------------------------- 1 | setl omnifunc=rubycomplete#Complete 2 | setl foldmethod=indent 3 | setl foldlevel=99 4 | 5 | " complete buffer loading can cause code execution 6 | " turn this off if it's a concern 7 | let g:rubycomplete_buffer_loading=1 8 | let g:rubycomplete_classes_in_global=1 9 | let g:rubycomplete_rails = 1 10 | 11 | let ruby_operators=1 12 | syn match parens /[(){}\[\]]/ 13 | hi def link parens Delimiter 14 | 15 | inoreabbrev erb <% %>F 16 | inoreabbrev erp <%= %>F 17 | inoreabbrev erc <%# %>F 18 | 19 | noremap R :w !ruby 20 | 21 | " realign 22 | nmap co. (realign_toggle_electric_dot) 23 | imap (realign_toggle_electric_dot) 24 | nmap = (realign_method_chain) 25 | xmap = (realign_method_chain) 26 | imap (realign_method_chain) 27 | 28 | " vim-ruby provides a command-line mapping for that 29 | " intelligently identifies the current Ruby cursor identifier. 30 | nmap (ArticulateTag) :exe v:count1 "tag " 31 | nmap (ArticulateTjump) :tjump 32 | -------------------------------------------------------------------------------- /init/search.vim: -------------------------------------------------------------------------------- 1 | " CtrlP 2 | let g:ctrlp_map = 'O' 3 | nnoremap L :CtrlPBuffer 4 | nnoremap bk :CtrlPQuickfix 5 | nnoremap bm :CtrlPMRU 6 | let g:ctrlp_by_filename = 1 7 | let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript', 8 | \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir'] 9 | let g:ctrlp_match_window = 'max:18' 10 | let g:ctrlp_open_new_file = 'r' 11 | let g:ctrlp_prompt_mappings = { 'PrtClearCache()': [''] } 12 | let g:ctrlp_switch_buffer = 'e' 13 | 14 | " Grepper/Ag 15 | let g:grepper = { 'highlight': 1, 'next_tool': '' } 16 | if executable('ag') 17 | let g:ctrlp_user_command = 'ag %s -l --nocolor -g "" 18 | \ --ignore .git 19 | \ --ignore .svn 20 | \ --ignore .hg 21 | \ --ignore .yardoc 22 | \ --ignore .github 23 | \ --ignore .bundle 24 | \ --ignore .DS_Store 25 | \ --ignore public 26 | \ --ignore images 27 | \ --ignore system 28 | \ --ignore data 29 | \ --ignore log 30 | \ --ignore vcr_cassettes 31 | \ --ignore "*.pyc" 32 | \ --ignore "*.exe" 33 | \ --ignore "*.so" 34 | \ --ignore "*.dll" 35 | \ --ignore "*.dat"' 36 | endif 37 | 38 | " Loupe 39 | let g:LoupeCenterResults = 0 40 | let g:LoupeHlSearchTimeout = 1000 41 | let g:LoupeVeryMagic = 0 42 | -------------------------------------------------------------------------------- /init/cursor.vim: -------------------------------------------------------------------------------- 1 | " ::::::::: Cursor :::::::::::::::::::::::: 2 | 3 | " ··········· helpers ········· {{{1 4 | " Do I still need/want this? 5 | highlight! CursorLineClear guibg=NONE guifg=NONE gui=NONE ctermbg=NONE ctermfg=NONE cterm=NONE 6 | 7 | func! InitCursorVars() 8 | if !exists("w:cursorline_on") 9 | let w:cursorline_on = 0 10 | endif 11 | endf 12 | 13 | func! RestoreCrsr() 14 | if line("'\"") > 1 && line("'\"") <= line("$") 15 | exe "normal! g`\"" 16 | endif 17 | endf 18 | " ····························· }}}1 19 | 20 | " Gui cursor 21 | set guicursor=n-v-c:block-blinkon0 22 | set guicursor+=ve:ver35 23 | set guicursor+=o:hor50 24 | set guicursor+=i-ci:ver25 25 | set guicursor+=r-cr:hor20 26 | set guicursor+=sm:block-blinkon0 27 | 28 | " cursor shape 29 | if has("nvim") 30 | " it all just works! 31 | elseif &term =~ 'xterm' 32 | let &t_SI="\]1337;CursorShape=1\x7" 33 | let &t_SR="\]1337;CursorShape=2\x7" 34 | let &t_EI="\]1337;CursorShape=0\x7" 35 | elseif &term =~ 'tmux\|screen' && exists("$TMUX") 36 | let &t_SI="\Ptmux;\\]50;CursorShape=1\x7\\\" 37 | let &t_SR="\Ptmux;\\]50;CursorShape=2\x7\\\" 38 | let &t_EI="\Ptmux;\\]50;CursorShape=0\x7\\\" 39 | endif 40 | 41 | " cursorline 42 | set cursorline 43 | let w:cursorline_on = 0 44 | 45 | augroup CursorGroup 46 | autocmd! 47 | autocmd BufReadPost * call RestoreCrsr() 48 | autocmd BufReadPost,BufNewFile * call InitCursorVars() 49 | augroup END 50 | 51 | -------------------------------------------------------------------------------- /colors/colorscheme_template.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: Your name 3 | " Last Change: 4 | " URL: 5 | 6 | " cool help screens 7 | " :he group-name 8 | " :he highlight-groups 9 | " :he cterm-colors 10 | 11 | " your pick: 12 | set background=dark " or light 13 | hi clear 14 | if exists("syntax_on") 15 | syntax reset 16 | endif 17 | let g:colors_name="mycolorscheme" 18 | 19 | "hi Normal 20 | 21 | " OR 22 | 23 | " highlight clear Normal 24 | " set background& 25 | " highlight clear 26 | " if &background == "light" 27 | " highlight Error ... 28 | " ... 29 | " else 30 | " highlight Error ... 31 | " ... 32 | " endif 33 | 34 | " A good way to see what your colorscheme does is to follow this procedure: 35 | " :w 36 | " :so % 37 | " 38 | " Then to see what the current setting is use the highlight command. 39 | " For example, 40 | " :hi Cursor 41 | " gives 42 | " Cursor xxx guifg=bg guibg=fg 43 | 44 | " Uncomment and complete the commands you want to change from the default. 45 | 46 | "hi Cursor 47 | "hi CursorIM 48 | "hi Directory 49 | "hi DiffAdd 50 | "hi DiffChange 51 | "hi DiffDelete 52 | "hi DiffText 53 | "hi ErrorMsg 54 | "hi VertSplit 55 | "hi Folded 56 | "hi FoldColumn 57 | "hi IncSearch 58 | "hi LineNr 59 | "hi ModeMsg 60 | "hi MoreMsg 61 | "hi NonText 62 | "hi Question 63 | "hi Search 64 | "hi SpecialKey 65 | "hi StatusLine 66 | "hi StatusLineNC 67 | "hi Title 68 | "hi Visual 69 | "hi VisualNOS 70 | "hi WarningMsg 71 | "hi WildMenu 72 | "hi Menu 73 | "hi Scrollbar 74 | "hi Tooltip 75 | 76 | " syntax highlighting groups 77 | "hi Comment 78 | "hi Constant 79 | "hi Identifier 80 | "hi Statement 81 | "hi PreProc 82 | "hi Type 83 | "hi Special 84 | "hi Underlined 85 | "hi Ignore 86 | "hi Error 87 | "hi Todo 88 | 89 | -------------------------------------------------------------------------------- /autoload/transposition.vim: -------------------------------------------------------------------------------- 1 | " Depends on functions in encoding.vim 2 | 3 | let s:plain_left = "\" 4 | let s:insert_left = "\U\" 5 | 6 | func! transposition#transpose(mode) 7 | if a:mode == 'c' 8 | return s:transpose( s:cursor(getcmdline(), getcmdpos()) ) 9 | else 10 | return s:transpose( s:cursor(getline('.'), col('.')) ) 11 | endif 12 | endf 13 | 14 | func! s:cursor(line, col) 15 | return { 16 | \ 'line': a:line, 17 | \ 'col': a:col, 18 | \ 'current_char': function('s:current_char'), 19 | \ 'previous_char': function('s:previous_char'), 20 | \ 'pre_previous_char': function('s:pre_previous_char') 21 | \} 22 | endf 23 | 24 | func! s:current_char() dict 25 | return s:literal(encoding#char(self.line, self.col)) 26 | endf 27 | 28 | func! s:previous_char() dict 29 | return s:literal(encoding#previous_char(self.line, self.col)) 30 | endf 31 | 32 | func! s:pre_previous_char() dict 33 | return s:literal(encoding#pre_previous_char(self.line, self.col)) 34 | endf 35 | 36 | func! s:transpose(cursor) 37 | if a:cursor.col == 1 38 | return '' 39 | elseif a:cursor.col > strlen(a:cursor.line) 40 | return s:transpose_preceding_chars(a:cursor) 41 | else 42 | return s:transpose_surrounding_chars(a:cursor) 43 | endif 44 | endf 45 | 46 | func! s:transpose_preceding_chars(cursor) 47 | let pre_previous_char = a:cursor.pre_previous_char() 48 | if pre_previous_char == '' 49 | return mode() == 'i' ? s:insert_left : s:plain_left 50 | endif 51 | return "\\" . a:cursor.previous_char() . pre_previous_char 52 | endf 53 | 54 | func! s:transpose_surrounding_chars(cursor) 55 | return "\\" . a:cursor.current_char() . a:cursor.previous_char() 56 | endf 57 | 58 | func! s:literal(char) 59 | return a:char == "\" ? "\\" : a:char 60 | endf 61 | -------------------------------------------------------------------------------- /plugshot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Generated by vim-plug 3 | # Fri Apr 17 22:54:47 2015 4 | 5 | vim +PlugUpdate +qa 6 | 7 | PLUG_HOME=~/.vim/plugged 8 | 9 | cd $PLUG_HOME/Vim-toCterm/ && git reset --hard 0f47db8 10 | cd $PLUG_HOME/ZoomWin/ && git reset --hard da618cb 11 | cd $PLUG_HOME/ag.vim/ && git reset --hard f05f313 12 | cd $PLUG_HOME/ctrlp.vim/ && git reset --hard b5d3fe6 13 | cd $PLUG_HOME/gundo.vim/ && git reset --hard 3975ac8 14 | cd $PLUG_HOME/hexHighlight.vim/ && git reset --hard 1d75780 15 | cd $PLUG_HOME/listical/ && git reset --hard 70f5a15 16 | cd $PLUG_HOME/netrw/ && git reset --hard e6eecf5 17 | cd $PLUG_HOME/splitjoin.vim/ && git reset --hard 0f33c44 18 | cd $PLUG_HOME/vim-airline/ && git reset --hard f45ecda 19 | cd $PLUG_HOME/vim-bundler/ && git reset --hard 48abb77 20 | cd $PLUG_HOME/vim-coffee-script/ && git reset --hard 827e4a3 21 | cd $PLUG_HOME/vim-commentary/ && git reset --hard 9c68513 22 | cd $PLUG_HOME/vim-dispatch/ && git reset --hard f18abc4 23 | cd $PLUG_HOME/vim-fugitive/ && git reset --hard 4cc201c 24 | cd $PLUG_HOME/vim-matchit/ && git reset --hard 57de3a7 25 | cd $PLUG_HOME/vim-qargs/ && git reset --hard 6694a87 26 | cd $PLUG_HOME/vim-rails/ && git reset --hard c7aeb5b 27 | cd $PLUG_HOME/vim-rake/ && git reset --hard afd766e 28 | cd $PLUG_HOME/vim-rbenv/ && git reset --hard 79a3316 29 | cd $PLUG_HOME/vim-repeat/ && git reset --hard c4f9f15 30 | cd $PLUG_HOME/vim-ruby/ && git reset --hard c298d2f 31 | cd $PLUG_HOME/vim-spec-runner/ && git reset --hard 43e9b5e 32 | cd $PLUG_HOME/vim-surround/ && git reset --hard 772ab95 33 | cd $PLUG_HOME/vim-tmux-runner/ && git reset --hard 515f7d8 34 | cd $PLUG_HOME/vim-unimpaired/ && git reset --hard 3548479 35 | cd $PLUG_HOME/vim-vinegar/ && git reset --hard ac89396 36 | cd $PLUG_HOME/vim-visual-star-search/ && git reset --hard 59d5f09 37 | cd $PLUG_HOME/xterm-color-table.vim/ && git reset --hard 9754e85 38 | 39 | -------------------------------------------------------------------------------- /colors/grb256.vim: -------------------------------------------------------------------------------- 1 | " Based on 2 | runtime colors/ir_black.vim 3 | 4 | let g:colors_name = "grb256" 5 | 6 | hi pythonSpaceError ctermbg=red guibg=red 7 | 8 | hi Comment ctermfg=darkgray 9 | 10 | hi StatusLine ctermbg=darkgrey ctermfg=white 11 | hi StatusLineNC ctermbg=black ctermfg=lightgrey 12 | hi VertSplit ctermbg=black ctermfg=lightgrey 13 | hi LineNr ctermfg=darkgray 14 | hi CursorLine guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=234 cterm=NONE 15 | hi Function guifg=#FFD2A7 guibg=NONE gui=NONE ctermfg=yellow ctermbg=NONE cterm=NONE 16 | hi Visual guifg=NONE guibg=#262D51 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE 17 | 18 | hi Error guifg=NONE guibg=NONE gui=undercurl ctermfg=16 ctermbg=red cterm=NONE guisp=#FF6C60 " undercurl color 19 | hi ErrorMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=16 ctermbg=red cterm=NONE 20 | hi WarningMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=16 ctermbg=red cterm=NONE 21 | hi SpellBad guifg=white guibg=#FF6C60 gui=BOLD ctermfg=16 ctermbg=160 cterm=NONE 22 | hi TabLineSel guifg=white guibg=black gui=NONE ctermfg=white ctermbg=NONE cterm=NONE 23 | 24 | " ir_black doesn't highlight operators for some reason 25 | hi Operator guifg=#6699CC guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE 26 | 27 | highlight DiffAdd term=reverse cterm=bold ctermbg=lightgreen ctermfg=16 28 | highlight DiffChange term=reverse cterm=bold ctermbg=lightblue ctermfg=16 29 | highlight DiffText term=reverse cterm=bold ctermbg=lightgray ctermfg=16 30 | highlight DiffDelete term=reverse cterm=bold ctermbg=lightred ctermfg=16 31 | 32 | highlight PmenuSel ctermfg=16 ctermbg=156 33 | -------------------------------------------------------------------------------- /autoload/optcycle.vim: -------------------------------------------------------------------------------- 1 | " ··········· line numbers ············· {{{1 2 | func! optcycle#number() 3 | if &number == 0 4 | setl foldcolumn=0 number number? 5 | else 6 | setl foldcolumn=1 nonumber number? 7 | end 8 | endf 9 | 10 | " ··········· folding ·················· {{{1 11 | func! optcycle#foldmethod() 12 | if &foldmethod == 'syntax' 13 | setl foldmethod=indent 14 | elseif &foldmethod == 'indent' 15 | setl foldmethod=marker 16 | elseif &foldmethod == 'marker' 17 | setl foldmethod=syntax 18 | endif 19 | 20 | if &filetype == 'ruby' 21 | if &foldmethod == 'syntax' 22 | let ruby_fold = 1 23 | elseif exists('ruby_fold') 24 | unlet ruby_fold 25 | endif 26 | endif 27 | 28 | set foldmethod? 29 | endf 30 | 31 | func! optcycle#foldcolumn(fold_max) 32 | if &foldcolumn < a:fold_max 33 | call s:foldcolumn_on(a:fold_max) 34 | else 35 | call s:foldcolumn_off() 36 | endif 37 | endf 38 | 39 | func! s:foldcolumn_on(fold_max) 40 | let w:use_num = &l:number 41 | let w:use_rel = &l:relativenumber 42 | let w:fold_min = &l:foldcolumn 43 | 44 | setl nonumber norelativenumber 45 | let &l:foldcolumn = a:fold_max 46 | endf 47 | 48 | func! s:foldcolumn_off() 49 | let [ &l:number, &l:relativenumber ] = [ w:use_num, w:use_rel ] 50 | let &l:foldcolumn = w:fold_min 51 | endf 52 | 53 | " ··········· colors ··················· {{{1 54 | func! optcycle#colorscheme() 55 | if exists("g:colors_name") 56 | execute 'colorscheme' (g:colors_name == 'nord') ? 'blight' : 'nord' 57 | endif 58 | endf 59 | 60 | func! optcycle#colorcolumn() 61 | let width = ColorColumnStart() 62 | 63 | if &colorcolumn != '' 64 | set colorcolumn= 65 | let w:long_line_highlight = matchadd('ColorColumn', '\%>'.width.'v.', 128) 66 | elseif exists('w:long_line_highlight') 67 | call matchdelete(w:long_line_highlight) 68 | unlet w:long_line_highlight 69 | else 70 | let &colorcolumn=join(range(width+1, width+256),',') 71 | endif 72 | endf 73 | 74 | -------------------------------------------------------------------------------- /init/transient-keys.vim: -------------------------------------------------------------------------------- 1 | let g:submode_timeout_len = 1500 2 | let g:submode_keep_leaving_key = 1 3 | 4 | " ·· navigate wrapped lines ··· {{{1 5 | call submode#enter_with('wrapido', 'n', '', 'gj', 'gj') 6 | call submode#enter_with('wrapido', 'n', '', 'gk', 'gk') 7 | 8 | call submode#map('wrapido', 'n', '', 'j', 'gj') 9 | call submode#map('wrapido', 'n', '', 'k', 'gk') 10 | 11 | call submode#map('wrapido', 'n', '', 'h', 'h') 12 | call submode#map('wrapido', 'n', '', 'l', 'l') 13 | 14 | " ·· navigate panes ··········· {{{1 15 | map wn_ 16 | nmap wn_ 17 | vmap wn_ gv 18 | 19 | " initiate 20 | map wn_ 21 | map wn_ 22 | map wn_ 23 | map wn_ 24 | 25 | " continue 26 | noremap