1 " Bundle ------------------------------------------------------------------ {{{
2 " Sun Sep 21 00:46:43 CST 2014
3 " refer https://github.com/connermcd/dotfiles.git
4 " and https://bitbucket.org/sjl/dotfiles
8 set rtp+=~/.vim/bundle/Vundle.vim
11 Plugin 'gmarik/Vundle.vim'
12 Bundle 'vim-scripts/FuzzyFinder'
13 Bundle 'vim-scripts/L9'
14 Bundle 'Valloric/YouCompleteMe'
15 Bundle 'octol/vim-cpp-enhanced-highlight'
16 Bundle 'vim-airline/vim-airline'
17 Bundle 'vim-airline/vim-airline-themes'
18 Bundle 'payneseu/nerdtree'
19 Bundle 'Townk/vim-autoclose'
20 Bundle 'majutsushi/tagbar'
21 Bundle 'vim-scripts/tcd.vim'
22 Bundle 'vim-scripts/cmdline-completion'
23 Bundle 'vim-scripts/vcscommand.vim'
24 Bundle 'Lokaltog/vim-easymotion'
25 "Bundle 'vim-scripts/YankRing.vim'
26 Bundle 'vim-scripts/gtags.vim'
27 Bundle 'kshenoy/vim-signature'
28 Bundle 'nathanaelkane/vim-indent-guides'
30 Bundle 'payneseu/mark-2.8.4'
31 "Bundle 'derekwyatt/vim-fswitch'
32 Bundle 'sjl/gundo.vim'
33 Bundle 'tpope/vim-markdown'
34 "Bundle 'vim-scripts/BreakPts'
35 "Bundle 'vim-scripts/genutils'
36 "Bundle 'vim-scripts/Marks-Browser'
37 Bundle 'MattesGroeger/vim-bookmarks'
38 "Bundle 'tpope/vim-repeat'
39 "Bundle 'kien/ctrlp.vim'
40 "disable since some conflicting mapping
41 Bundle 'vim-latex/vim-latex'
44 filetype plugin indent on
47 " Basic options ----------------------------------------------------------- {{{
63 set diffopt=filler,vertical
66 set listchars=tab:▸\ ,eol:¬,extends:❯,precedes:❮
74 set completeopt=longest,menuone
76 "set wildmode=list:longest
78 set wildignore=*.o,*.obj,*~,*.swp,*.DS_Store,*.git,*.svn,*.hg
83 set nostartofline " don't jump to first character when paging
86 "set textwidth, formatoptions for chinese
93 set macmeta "" Macvim only
96 set guifont=Sauce\ Code\ Powerline\ Light:h11
97 highlight Cursor guifg=white guibg=green
98 set guicursor=a:blinkon0
104 colorscheme molokai22
105 " http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users
106 "https://gist.github.com/andyfowler/1195581
108 let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
109 let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
111 let &t_SI = "\<Esc>]50;CursorShape=1\x7"
112 let &t_EI = "\<Esc>]50;CursorShape=0\x7"
118 " Mappings ---------------------------------------------------------------- {{{
121 " Normal mode ------------------------------------------------------------- {{{
128 nmap <Leader>w :w<CR>
129 nmap <Leader>q :q<CR>
130 nmap <Leader>e :e<Space>
131 nmap <Leader>W :w !sudo tee %<CR>
132 nmap <Leader>h :vertical help<Space>
133 nmap <Leader>t :tabedit %<Space>
134 "nmap <Leader>x :x<CR>
141 nnoremap <Leader>v <C-W>v
142 nnoremap <Leader>s <C-W>s
150 nnoremap <C-D> <C-D>zz
151 nnoremap <C-U> <C-U>zz
153 "nnoremap <SPACE> <C-F>
154 nnoremap <S-SPACE> <C-B>
158 "nmap <A-TAB> :bn<CR>
159 " map <A-TAB> Alt+TAB
160 "noremap <A-S-TAB> "input C-V then input key sequence to
161 "http://vim.wikia.com/wiki/Make_Shift-Tab_work
162 "nnoremap <ESC><TAB> :bn<CR>
163 nnoremap <ESC><TAB> :tabnext<CR>
164 "nnoremap
\e\19 :bp<CR>
165 nnoremap
\e\19 :tabprevious<CR>
166 "nmap <A-S-TAB> :bp<CR>
167 "nmap <A-SPACE> :b#<CR>
168 "nmap <Leader>d :bd<CR>
169 "" keymappig for register operations
170 ""TODO check if this already mapping
171 "nnoremap <Leader>r :registers<CR>
172 "noremap <Leader>x :<C-p>
176 " also works :r !pbpaste<CR>
178 nmap <A-=> :resize<CR>:vertical resize<CR>
179 nmap
\e= :resize<CR>:vertical resize<CR>
192 noremap <Leader>z zmzvzz
193 nmap \\ :nohlsearch<CR>
195 " Insert mode ------------------------------------------------------------- {{{
197 inoremap <C-U> <C-G>u<C-U>
198 inoremap <C-a> <Home>
201 inoremap <C-b> <S-Left>
202 inoremap <C-f> <S-Right>
203 imap <A-d> <S-Right><C-w>
205 " Command mode ------------------------------------------------------- {{{
207 cnoremap <C-A> <Home>
209 cnoremap <C-B> <Left>
210 cnoremap <C-F> <Right>
214 if has("gui_running")
215 " only for Macvim <D-Left> D is Command key
219 cnoremap <A-b> <S-Left>
220 cnoremap <A-f> <S-Right>
221 cnoremap <A-d> <S-Right><S-Right><S-Left><C-w>
223 cnoremap
\eb <S-Left>
224 cnoremap
\ef <S-Right>
225 cnoremap
\ed <S-Right><S-Right><S-Left><C-w>
227 " delet a word left of cursor
230 " Visual mode ------------------------------------------------------------- {{{
231 "" key mapping for visul mode
240 vnoremap <Leader>p "*p
241 "search for visually selectecd text
242 vnoremap // y/<C-R>"<CR>
246 " Plugins Configuration --------------------------------------------------- {{{
247 " Fuzzy Finder ------------------------------------------------------------ {{{
248 let g:fuf_modesDisable = []
249 let g:fuf_mrufile_maxItem = 400
250 let g:fuf_mrucmd_maxItem = 400
251 let g:fuf_file_exclude = '\v\~$|\.(DS_Store|o|exe|dll|bak|orig|swp|pyc)$|(^|[/\\])\.(hg|git|bzr|svn)($|[/\\])'
252 let g:fuf_buffertag_ctagsPath = '/usr/local/bin/ctags'
253 let g:fuf_enumeratingLimit = 30
254 nnoremap <silent> sj :FufBuffer<CR>
255 nnoremap <silent> sk :FufFileWithCurrentBufferDir<CR>
256 nnoremap <silent> sK :FufFileWithFullCwd<CR>
257 nnoremap <silent> s<C-k> :FufFile<CR>
258 "nnoremap <silent> sl :FufCoverageFileChange<CR>
259 "nnoremap <silent> sL :FufCoverageFileChange<CR>
260 "nnoremap <silent> s<C-l> :FufCoverageFileRegister<CR>
261 nnoremap <silent> sd :FufDirWithCurrentBufferDir<CR>
262 nnoremap <silent> sD :FufDirWithFullCwd<CR>
263 nnoremap <silent> s<C-d> :FufDir<CR>
264 nnoremap <silent> sn :FufMruFile<CR>
265 nnoremap <silent> sN :FufMruFileInCwd<CR>
266 nnoremap <silent> sm :FufMruCmd<CR>
267 "nnoremap <silent> su :FufBookmarkFile<CR>
268 nnoremap <silent> s<C-u> :FufBookmarkFileAdd<CR>
269 "vnoremap <silent> s<C-u> :FufBookmarkFileAddAsSelectedText<CR>
270 nnoremap <silent> si :FufBookmarkDir<CR>
271 nnoremap <silent> s<C-i> :FufBookmarkDirAdd<CR>
272 nnoremap <silent> sT :FufTag<CR>
273 nnoremap <silent> st :FufTag!<CR>
274 nnoremap <silent> s<C-]> :FufTagWithCursorWord!<CR>
275 nnoremap <silent> s, :FufBufferTag<CR>
276 nnoremap <silent> s< :FufBufferTag!<CR>
277 "vnoremap <silent> s, :FufBufferTagWithSelectedText!<CR>
278 "vnoremap <silent> s< :FufBufferTagWithSelectedText<CR>
279 nnoremap <silent> s} :FufBufferTagWithCursorWord!<CR>
280 nnoremap <silent> sl :FufBufferTagAll<CR>
281 "nnoremap <silent> s. :FufBufferTagAll<CR>
282 nnoremap <silent> s> :FufBufferTagAll!<CR>
283 "vnoremap <silent> s. :FufBufferTagAllWithSelectedText!<CR>
284 "vnoremap <silent> s> :FufBufferTagAllWithSelectedText<CR>
285 "nnoremap <silent> s] :FufBufferTagAllWithCursorWord!<CR>
286 nnoremap <silent> sG :FufTaggedFile<CR>
287 nnoremap <silent> sg :FufTaggedFile!<CR>
288 "nnoremap <silent> so :FufJumpList<CR>
289 "nnoremap <silent> sp :FufChangeList<CR>
290 "nnoremap <silent> sq :FufQuickfix<CR>
291 "nnoremap <silent> sy :FufLine<CR>
292 " nnoremap <silent> sh :FufHelp<CR>
293 "nnoremap <silent> se :FufEditDataFile<CR>
294 nnoremap <silent> sr :FufRenewCache<CR>
296 " YouCompleteMe ----------------------------------------------------------- {{{
297 "syntax on, must before the YCM,
299 "let g:ycm_collect_identifiers_from_tags_files = 1
300 let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
301 " this is fix youcompleteme python error
302 "http://www.cnblogs.com/clivelee/p/4266559.html
303 "https://github.com/Valloric/YouCompleteMe/issues/18
304 let g:ycm_path_to_python_interpreter= '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python'
305 let g:ycm_auto_trigger = 1
306 let g:ycm_seed_identifiers_with_syntax = 1
307 let g:ycm_show_diagnostics_ui = 0
308 let g:ycm_enable_diagnostic_signs = 0
309 set completeopt-=preview " disable preview windows for completion
310 let g:ycm_confirm_extra_conf = 0
311 " delete default mapping for <leader>d
312 let g:ycm_key_detailed_diagnostics = ''
315 " Airline ----------------------------------------------------------------- {{{
316 "if has("gui_running")
318 let g:airline_mode_map = {
332 let g:airline_theme = 'badwolf'
334 "if has("gui_running")
335 let g:airline_powerline_fonts=1
336 let g:airline_left_sep = ''
337 let g:airline_left_alt_sep = ''
338 let g:airline_right_sep = ''
339 let g:airline_right_alt_sep = ''
341 " let g:airline#extensions#tabline#show_buffers = 1
342 let g:airline#extensions#tabline#show_buffers = 0
343 let g:airline#extensions#tabline#enabled = 1
344 let g:airline#extensions#tabline#left_sep = ''
345 let g:airline#extensions#tabline#left_alt_sep =''
346 let g:airline#extensions#tagbar#enabled = 1
348 " let g:airline_powerline_fonts=1
349 " let g:airline_left_sep = ''
350 "" let g:airline_left_alt_sep = ''
351 " let g:airline_right_sep = ''
352 "" let g:airline_right_alt_sep = ''
354 " let g:airline#extensions#tabline#show_buffers = 0
355 " let g:airline#extensions#tabline#enabled = 1
356 " let g:airline#extensions#tabline#left_sep = ''
357 "" let g:airline#extensions#tabline#left_alt_sep =''
358 " let g:airline#extensions#tagbar#enabled = 1
361 " let g:airline_section_a = 'N'
362 let g:airline_section_b = '%f%m'
363 let g:airline_section_c = ''
364 let g:airline_section_x = '[%-.50{CurDir()}]'
365 let g:airline_section_y = '%y'
366 let g:airline_section_z = '%c, %l/%L %p%%'
367 let g:airline_section_warning = '' " (syntastic, whitespace)
370 set statusline=\ %<%F%m%=[%-.50{CurDir()}]\ %y\ %c,\ %l/%L\ \ %p%%\
372 let curdir = substitute(getcwd(), $HOME, "~", "g")
378 " NerdTree ---------------------------------------------------------------- {{{
379 " TODO check if this is already using in plugins
380 "nmap <Leader>n :NERDTreeToggle<CR>
381 nmap <Leader>N :NERDTreeFind<CR>
383 " AutoClose --------------------------------------------------------------- {{{
384 let g:AutoCloseProtectedRegions = ["Dialog", "ThoughBubble"]
386 " TagBar ------------------------------------------------------------------ {{{
387 noremap <Leader>f :TagbarToggle<CR><C-w>l
388 let Tlist_Ctags_Cmd="/usr/local/bin/ctags"
390 " Tcd --------------------------------------------------------------------- {{{
393 " cmdline-completion ------------------------------------------------------ {{{
394 "http://foocoder.com/blog/mei-ri-vimcha-jian-suo-jin-xian-shi-vim-indent-guides.html/
395 cmap <C-J> <Plug>CmdlineCompletionBackward
396 cmap <C-K> <Plug>CmdlineCompletionForward
398 " VSCCommand -------------------------------------------------------------- {{{
399 "" ============== VCSCommand.vim =====================
400 "let VCSCommandSVKExec='disabled no such executable'
401 let VCSCommandDeleteOnHide=1
402 let VCSCommandDisableMappings=1
403 "let VCSCommandEnableBufferSetup=1
404 "nmap <Leader>sd :VCSVimDiff<CR>
406 autocmd User VCSBufferCreated silent! nmap <unique> <buffer> q :bwipeout<cr> | setlocal nomodifiable
408 nmap <Leader>dg :diffget<CR>
410 " YankRing ---------------------------------------------------------------- {{{
411 let g:yankring_min_element_length = 2
413 let g:yankring_replace_n_pkey = '<A->>'
414 let g:yankring_replace_n_nkey = '<A-<>'
415 let g:yankring_history_dir = "$HOME/.vim/temp/"
417 " Gtags ------------------------------------------------------------------- {{{
418 if has("gui_running")
419 noremap <A-.> :Gtags<CR>
420 noremap <A-r> :Gtags -r<CR>
421 noremap <A-o> :Gtags -s<CR>
422 noremap <A-g> :Gtags -g<CR>
424 noremap
\e. :Gtags<CR>
425 noremap
\er :Gtags -r<CR>
426 " noremap j :Gtags -s<CR>
427 noremap
\eg :Gtags -g<CR>
430 " Marks ------------------------------------------------------------------- {{{
431 nmap \h <Plug>MarkSet
432 "nmap * <Plug>MarkSearchNext
433 "nmap # <Plug>MarkSearchPrev
435 " Gundo ------------------------------------------------------------------- {{{
436 " nnoremap <F5> :GundoToggle<CR>
438 " Bookmarks --------------------------------------------------------------- {{{
440 let g:bookmark_save_per_working_dir = 1
441 let g:bookmark_auto_close = 1
442 let g:bookmark_auto_save = 1
443 " unmap the default mapping in plugins
444 nmap <Plug>DisableBookmarkToggle <Plug>BookmarkToggle
445 nmap <Plug>DisableBookmarkAnnotate <Plug>BookmarkAnnotate
446 nmap <Plug>DisableBookmarkShowAll <Plug>BookmarkShowAll
447 nmap <Plug>DisableBookmarkNext <Plug>BookmarkNext
448 nmap <Plug>DisableBookmarkPrev <Plug>BookmarkPrev
449 nmap <Plug>DisableBookmarkClear <Plug>BookmarkClear
450 nmap <Plug>DisableBookmarkClearAll <Plug>BookmarkClearAll
452 nmap mm <Plug>BookmarkToggle
453 " nmap ,i <Plug>BookmarkAnnotate
454 nmap \m <Plug>BookmarkShowAll
455 let g:bookmark_center = 1
456 let g:bookmark_auto_close = 1
457 "let g:bookmark_highlight_lines = 1
458 " nmap ,j <Plug>BookmarkNext
459 " nmap ,k <Plug>BookmarkPrev
460 " nmap ,c <Plug>BookmarkClear
461 " nmap ,x <Plug>BookmarkClearAll
463 " EasyMotion -------------------------------------------------------------- {{{
464 map en <Plug>(easymotion-sn)
465 map ej <Plug>(easymotion-j)
466 map ek <Plug>(easymotion-k)
467 map eb <Plug>(easymotion-b)
468 map ew <Plug>(easymotion-w)
469 map ee <Plug>(easymotion-w)
470 map el <Plug>(easymotion-lineforward)
471 map eh <Plug>(easymotion-linebackward)
473 "map <SPACE>n <Plug>(easymotion-sn)
474 "map <SPACE>j <Plug>(easymotion-j)
475 "map <SPACE>k <Plug>(easymotion-k)
476 "map <SPACE>b <Plug>(easymotion-b)
477 "map <SPACE>w <Plug>(easymotion-w)
478 "map <SPACE>e <Plug>(easymotion-w)
479 "map <SPACE>l <Plug>(easymotion-lineforward)
480 "map <SPACE>h <Plug>(easymotion-linebackward)
483 " vim-latex --------------------------------------------------------------- {{{
484 "set grepprg=grep\ -nH\ $*
485 "let g:tex_flavor='latex'
487 "autocmd BufEnter *.tex set sw=2
488 "disable default mapping
489 imap #$ <Plug>IMAP_JumpForward
490 nmap #$ <Plug>IMAP_JumpForward
491 vmap #$ <Plug>IMAP_JumpForward
492 vmap #$ <Plug>IMAP_DeleteAndJumpForward
493 let g:Imap_FreezeImap=1
496 " FileType ---------------------------------------------------------------- {{{
497 autocmd BufNewFile,BufRead *.log set filetype=logecc
498 autocmd BufNewFile,BufRead *.log.[0-9] set filetype=logecc
499 autocmd BufNewFile,BufRead *tmux.conf set filetype=tmux
500 autocmd BufNewFile,BufRead SConstruct set filetype=python
501 autocmd BufNewFile,BufRead SConscript* set filetype=python
502 autocmd BufNewFile,BufReadPost *.md set filetype=markdown
503 autocmd BufNewFile,BufRead *.c set filetype=cpp
505 " http://vim.wikia.com/wiki/Update_the_diff_view_automatically
506 autocmd InsertLeave,BufWritePost,CursorHold * if &diff == 1 | diffupdate | endif
507 " setlocal nomodifiable for svn diff
508 autocmd BufWinEnter *.svn-base setlocal nomodifiable
510 autocmd WinEnter * nnoremap <buffer> gj @=(&diff)?']czz':'gj'<CR> |
511 \ nnoremap <buffer> gk @=(&diff)?'[czz':'gk'<CR>
513 autocmd FileType qf nnoremap <buffer> <silent> q :q<CR> | setlocal nowrap | setlocal nocursorline
514 autocmd FileType help nnoremap <buffer> <silent> q :q<CR> | vertical resize 85;
515 autocmd FileType c,cpp setlocal foldmethod=syntax |
516 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
517 \ inoremap <buffer> { {<CR>}<ESC>kA<CR>|
518 \ nnoremap <buffer> <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zzzr:wincmd w<cr>
519 autocmd FileType python setlocal foldmethod=indent |
522 autocmd FileType xml setlocal foldmethod=syntax |
523 \ let g:xml_syntax_folding=1
524 autocmd FileType vim setlocal foldmethod=marker |
525 \ setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
526 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("", "{} \"")
528 autocmd FileType perl setlocal foldmethod=syntax |
529 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
530 \ inoremap <buffer> {<CR> {<CR>}<ESC>kA<CR>
532 autocmd Filetype markdown setlocal textwidth=80
534 autocmd CmdwinEnter * map <buffer> q :q<CR>
537 " Functions --------------------------------------------------------------- {{{
538 " DiffOrig ---------------------------------------------------------------- {{{
539 " refert vimrc_example.vim
540 " Convenient command to see the difference between the current buffer and the
541 " file it was loaded from, thus the changes you made.
542 " Only define it when not defined already.
543 if !exists(":DiffOrig")
544 command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
545 \ | wincmd p | diffthis
548 " Fold Quickfix ----------------------------------------------------------- {{{
549 "http://vim.wikia.com/wiki/Show_only_lines_in_quickfix_list_for_current_buffer
550 if ! exists('g:foldmisses_context')
551 let g:foldmisses_context = 0
554 " Add manual fold from line1 to line2, inclusive.
555 function! s:Fold(line1, line2)
557 execute a:line1.','.a:line2.'fold'
561 " Return list of line numbers for current buffer found in quickfix list.
562 function! s:GetHitLineNumbers(list)
565 if d.valid && d.bufnr == bufnr('')
566 call add(result, d.lnum)
572 function! s:FoldMisses(list, context)
573 setlocal foldmethod=manual
575 let extra = a:context == 99999 ? g:foldmisses_context : a:context
577 for lnum in s:GetHitLineNumbers(a:list)
578 " let start = last==0 ? 1 : last+extra
579 let start = last==0 ? 1 : last+1+extra
580 call s:Fold(start, lnum-1-extra)
583 call s:Fold(last+1+extra, line('$'))
584 " call s:Fold(last+extra, line('$'))
587 ":[N]FoldMisses [N] Show only the lines (and surrounding [N] lines
588 ":[N]FoldLMisses [N] of context) in the current buffer that appear
589 " in the quickfix / location list.
590 " Missed, error-free lines are folded away.
591 command! -bar -count=99999 FoldMisses call s:FoldMisses(getqflist(), <count>)
592 command! -bar -count=99999 FoldLMisses call s:FoldMisses(getloclist(0), <count>)
594 " ToggleList -------------------------------------------------------------- {{{
595 "http://vim.wikia.com/wiki/Toggle_to_open_or_close_the_quickfix_window
596 function! GetBufferList()
603 function! ToggleList(bufname, pfx)
604 let buflist = GetBufferList()
605 for bufnum in map(filter(split(buflist, '\n'), 'v:val =~ "'.a:bufname.'"'), 'str2nr(matchstr(v:val, "\\d\\+"))')
606 if bufwinnr(bufnum) != -1
611 if a:pfx == 'l' && len(getloclist(0)) == 0
613 echo "Location List is Empty."
623 nmap <silent> \l :call ToggleList("Location List", 'l')<CR>
624 nmap <silent> \q :call ToggleList("Quickfix List", 'c')<CR>
626 " DiffToggle -------------------------------------------------------------- {{{
627 "if !exists(":DiffToggle")
630 function! DiffToggle()
632 diffoff | wincmd l | :q
634 exec ":VCSVimDiff" | wincmd h
637 nnoremap \d :call DiffToggle()<CR>
638 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
643 "nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
644 nnoremap <silent> <cr> @=(foldlevel('.')?'za':"\<Space>")<CR>
645 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
647 " https://bitbucket.org/sjl/dotfiles/src/tip/vim/vimrc
648 " Make sure Vim returns to the same line when you reopen a file.
653 \ if line("'\"") > 0 && line("'\"") <= line("$") |
654 \ execute 'normal! g`"zvzz' |
658 iabbrev -... <C-R>=repeat('-', 80 - col(".") - 4 ) . " {{{"
662 " to show the key sequence when pressing some key,
668 " some prefix for mapping
675 nnoremap <C-N> :cn<CR>zzzv
676 nnoremap <C-P> :cp<CR>zzzv
677 "http://dougblack.io/words/a-good-vimrc.html
680 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:vsp<CR>:wincmd w<cr>:exec("tag ". word)<cr>
681 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zz:wincmd w<cr>
682 " command in normal mode, and visual mode
685 " gn select search and in visual mode
686 " confirm when using :q to quit the last tab page,
687 "Alias q if\ winnr('$')>1||tabpagenr('$')>1||confirm('Really\ quit?',\ "&OK\\n&Cancel")==1|quit|endif
691 " color of current line
693 nnoremap <Leader>m :marks abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<CR>:normal '
695 "let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript',
696 " \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir']