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=Source\ Code\ Pro\ 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 " Load YouCompleteMe only on OSX
301 let g:loaded_youcompleteme = 1
304 "let g:ycm_collect_identifiers_from_tags_files = 1
305 let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
306 " this is fix youcompleteme python error
307 "http://www.cnblogs.com/clivelee/p/4266559.html
308 "https://github.com/Valloric/YouCompleteMe/issues/18
309 let g:ycm_path_to_python_interpreter= '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python'
310 let g:ycm_auto_trigger = 1
311 let g:ycm_seed_identifiers_with_syntax = 1
312 let g:ycm_show_diagnostics_ui = 0
313 let g:ycm_enable_diagnostic_signs = 0
314 set completeopt-=preview " disable preview windows for completion
315 let g:ycm_confirm_extra_conf = 0
316 " delete default mapping for <leader>d
317 let g:ycm_key_detailed_diagnostics = ''
320 " Airline ----------------------------------------------------------------- {{{
321 "if has("gui_running")
323 let g:airline_mode_map = {
337 let g:airline_theme = 'badwolf'
339 "if has("gui_running")
340 let g:airline_powerline_fonts=1
341 let g:airline_left_sep = ''
342 let g:airline_left_alt_sep = ''
343 let g:airline_right_sep = ''
344 let g:airline_right_alt_sep = ''
346 " let g:airline#extensions#tabline#show_buffers = 1
347 let g:airline#extensions#tabline#show_buffers = 0
348 let g:airline#extensions#tabline#enabled = 1
349 let g:airline#extensions#tabline#left_sep = ''
350 let g:airline#extensions#tabline#left_alt_sep =''
351 let g:airline#extensions#tagbar#enabled = 1
353 " let g:airline_powerline_fonts=1
354 " let g:airline_left_sep = ''
355 "" let g:airline_left_alt_sep = ''
356 " let g:airline_right_sep = ''
357 "" let g:airline_right_alt_sep = ''
359 " let g:airline#extensions#tabline#show_buffers = 0
360 " let g:airline#extensions#tabline#enabled = 1
361 " let g:airline#extensions#tabline#left_sep = ''
362 "" let g:airline#extensions#tabline#left_alt_sep =''
363 " let g:airline#extensions#tagbar#enabled = 1
366 " let g:airline_section_a = 'N'
367 let g:airline_section_b = '%f%m'
368 let g:airline_section_c = ''
369 let g:airline_section_x = '[%-.50{CurDir()}]'
370 let g:airline_section_y = '%y'
371 let g:airline_section_z = '%c, %l/%L %p%%'
372 let g:airline_section_warning = '' " (syntastic, whitespace)
375 set statusline=\ %<%F%m%=[%-.50{CurDir()}]\ %y\ %c,\ %l/%L\ \ %p%%\
377 let curdir = substitute(getcwd(), $HOME, "~", "g")
383 " NerdTree ---------------------------------------------------------------- {{{
384 " Fix keymapping conflict
385 nmap <unique> <Leader>, <Plug>MarkClear
386 nmap <Leader>n :NERDTreeToggle<CR>
387 nmap <Leader>N :NERDTreeFind<CR>
389 " AutoClose --------------------------------------------------------------- {{{
390 let g:AutoCloseProtectedRegions = ["Dialog", "ThoughBubble"]
392 " TagBar ------------------------------------------------------------------ {{{
393 noremap <Leader>f :TagbarToggle<CR><C-w>l
394 let Tlist_Ctags_Cmd="/usr/local/bin/ctags"
396 " Tcd --------------------------------------------------------------------- {{{
399 " cmdline-completion ------------------------------------------------------ {{{
400 "http://foocoder.com/blog/mei-ri-vimcha-jian-suo-jin-xian-shi-vim-indent-guides.html/
401 cmap <C-J> <Plug>CmdlineCompletionBackward
402 cmap <C-K> <Plug>CmdlineCompletionForward
404 " VSCCommand -------------------------------------------------------------- {{{
405 "" ============== VCSCommand.vim =====================
406 "let VCSCommandSVKExec='disabled no such executable'
407 let VCSCommandDeleteOnHide=1
408 let VCSCommandDisableMappings=1
409 "let VCSCommandEnableBufferSetup=1
410 "nmap <Leader>sd :VCSVimDiff<CR>
412 autocmd User VCSBufferCreated silent! nmap <unique> <buffer> q :bwipeout<cr> | setlocal nomodifiable
414 nmap <Leader>dg :diffget<CR>
416 " YankRing ---------------------------------------------------------------- {{{
417 let g:yankring_min_element_length = 2
419 let g:yankring_replace_n_pkey = '<A->>'
420 let g:yankring_replace_n_nkey = '<A-<>'
421 let g:yankring_history_dir = "$HOME/.vim/temp/"
423 " Gtags ------------------------------------------------------------------- {{{
424 if has("gui_running")
425 noremap <A-.> :Gtags<CR>
426 noremap <A-r> :Gtags -r<CR>
427 noremap <A-o> :Gtags -s<CR>
428 noremap <A-g> :Gtags -g<CR>
430 noremap
\e. :Gtags<CR>
431 noremap
\er :Gtags -r<CR>
432 " noremap j :Gtags -s<CR>
433 noremap
\eg :Gtags -g<CR>
436 " Marks ------------------------------------------------------------------- {{{
437 nmap \h <Plug>MarkSet
438 "nmap * <Plug>MarkSearchNext
439 "nmap # <Plug>MarkSearchPrev
441 " Gundo ------------------------------------------------------------------- {{{
442 " nnoremap <F5> :GundoToggle<CR>
444 " Bookmarks --------------------------------------------------------------- {{{
446 let g:bookmark_save_per_working_dir = 1
447 let g:bookmark_auto_close = 1
448 let g:bookmark_auto_save = 1
449 " unmap the default mapping in plugins
450 nmap <Plug>DisableBookmarkToggle <Plug>BookmarkToggle
451 nmap <Plug>DisableBookmarkAnnotate <Plug>BookmarkAnnotate
452 nmap <Plug>DisableBookmarkShowAll <Plug>BookmarkShowAll
453 nmap <Plug>DisableBookmarkNext <Plug>BookmarkNext
454 nmap <Plug>DisableBookmarkPrev <Plug>BookmarkPrev
455 nmap <Plug>DisableBookmarkClear <Plug>BookmarkClear
456 nmap <Plug>DisableBookmarkClearAll <Plug>BookmarkClearAll
458 nmap mm <Plug>BookmarkToggle
459 " nmap ,i <Plug>BookmarkAnnotate
460 nmap \m <Plug>BookmarkShowAll
461 let g:bookmark_center = 1
462 let g:bookmark_auto_close = 1
463 "let g:bookmark_highlight_lines = 1
464 " nmap ,j <Plug>BookmarkNext
465 " nmap ,k <Plug>BookmarkPrev
466 " nmap ,c <Plug>BookmarkClear
467 " nmap ,x <Plug>BookmarkClearAll
469 " EasyMotion -------------------------------------------------------------- {{{
470 map en <Plug>(easymotion-sn)
471 map ej <Plug>(easymotion-j)
472 map ek <Plug>(easymotion-k)
473 map eb <Plug>(easymotion-b)
474 map ew <Plug>(easymotion-w)
475 map ee <Plug>(easymotion-w)
476 map el <Plug>(easymotion-lineforward)
477 map eh <Plug>(easymotion-linebackward)
479 "map <SPACE>n <Plug>(easymotion-sn)
480 "map <SPACE>j <Plug>(easymotion-j)
481 "map <SPACE>k <Plug>(easymotion-k)
482 "map <SPACE>b <Plug>(easymotion-b)
483 "map <SPACE>w <Plug>(easymotion-w)
484 "map <SPACE>e <Plug>(easymotion-w)
485 "map <SPACE>l <Plug>(easymotion-lineforward)
486 "map <SPACE>h <Plug>(easymotion-linebackward)
489 " vim-latex --------------------------------------------------------------- {{{
490 "set grepprg=grep\ -nH\ $*
491 "let g:tex_flavor='latex'
493 "autocmd BufEnter *.tex set sw=2
494 "disable default mapping
495 imap #$ <Plug>IMAP_JumpForward
496 nmap #$ <Plug>IMAP_JumpForward
497 vmap #$ <Plug>IMAP_JumpForward
498 vmap #$ <Plug>IMAP_DeleteAndJumpForward
499 let g:Imap_FreezeImap=1
502 " FileType ---------------------------------------------------------------- {{{
503 autocmd BufNewFile,BufRead *.log set filetype=logecc
504 autocmd BufNewFile,BufRead *.log.[0-9] set filetype=logecc
505 autocmd BufNewFile,BufRead *tmux.conf set filetype=tmux
506 autocmd BufNewFile,BufRead SConstruct set filetype=python
507 autocmd BufNewFile,BufRead SConscript* set filetype=python
508 autocmd BufNewFile,BufReadPost *.md set filetype=markdown
509 autocmd BufNewFile,BufRead *.c set filetype=cpp
511 " http://vim.wikia.com/wiki/Update_the_diff_view_automatically
512 autocmd InsertLeave,BufWritePost,CursorHold * if &diff == 1 | diffupdate | endif
513 " setlocal nomodifiable for svn diff
514 autocmd BufWinEnter *.svn-base setlocal nomodifiable
516 autocmd WinEnter * nnoremap <buffer> gj @=(&diff)?']czz':'gj'<CR> |
517 \ nnoremap <buffer> gk @=(&diff)?'[czz':'gk'<CR>
519 autocmd FileType qf nnoremap <buffer> <silent> q :q<CR> | setlocal nowrap | setlocal nocursorline
520 autocmd FileType help nnoremap <buffer> <silent> q :q<CR> | vertical resize 85;
521 autocmd FileType c,cpp setlocal foldmethod=syntax |
522 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
523 \ inoremap <buffer> { {<CR>}<ESC>kA<CR>|
524 \ nnoremap <buffer> <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zzzr:wincmd w<cr>
525 autocmd FileType python setlocal foldmethod=indent |
528 autocmd FileType xml setlocal foldmethod=syntax |
529 \ let g:xml_syntax_folding=1
530 autocmd FileType vim setlocal foldmethod=marker |
531 \ setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
532 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("", "{} \"")
534 autocmd FileType perl setlocal foldmethod=syntax |
535 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
536 \ inoremap <buffer> {<CR> {<CR>}<ESC>kA<CR>
538 autocmd Filetype markdown setlocal textwidth=80
540 autocmd CmdwinEnter * map <buffer> q :q<CR>
543 " Functions --------------------------------------------------------------- {{{
544 " DiffOrig ---------------------------------------------------------------- {{{
545 " refert vimrc_example.vim
546 " Convenient command to see the difference between the current buffer and the
547 " file it was loaded from, thus the changes you made.
548 " Only define it when not defined already.
549 if !exists(":DiffOrig")
550 command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
551 \ | wincmd p | diffthis
554 " Fold Quickfix ----------------------------------------------------------- {{{
555 "http://vim.wikia.com/wiki/Show_only_lines_in_quickfix_list_for_current_buffer
556 if ! exists('g:foldmisses_context')
557 let g:foldmisses_context = 0
560 " Add manual fold from line1 to line2, inclusive.
561 function! s:Fold(line1, line2)
563 execute a:line1.','.a:line2.'fold'
567 " Return list of line numbers for current buffer found in quickfix list.
568 function! s:GetHitLineNumbers(list)
571 if d.valid && d.bufnr == bufnr('')
572 call add(result, d.lnum)
578 function! s:FoldMisses(list, context)
579 setlocal foldmethod=manual
581 let extra = a:context == 99999 ? g:foldmisses_context : a:context
583 for lnum in s:GetHitLineNumbers(a:list)
584 " let start = last==0 ? 1 : last+extra
585 let start = last==0 ? 1 : last+1+extra
586 call s:Fold(start, lnum-1-extra)
589 call s:Fold(last+1+extra, line('$'))
590 " call s:Fold(last+extra, line('$'))
593 ":[N]FoldMisses [N] Show only the lines (and surrounding [N] lines
594 ":[N]FoldLMisses [N] of context) in the current buffer that appear
595 " in the quickfix / location list.
596 " Missed, error-free lines are folded away.
597 command! -bar -count=99999 FoldMisses call s:FoldMisses(getqflist(), <count>)
598 command! -bar -count=99999 FoldLMisses call s:FoldMisses(getloclist(0), <count>)
600 " ToggleList -------------------------------------------------------------- {{{
601 "http://vim.wikia.com/wiki/Toggle_to_open_or_close_the_quickfix_window
602 function! GetBufferList()
609 function! ToggleList(bufname, pfx)
610 let buflist = GetBufferList()
611 for bufnum in map(filter(split(buflist, '\n'), 'v:val =~ "'.a:bufname.'"'), 'str2nr(matchstr(v:val, "\\d\\+"))')
612 if bufwinnr(bufnum) != -1
617 if a:pfx == 'l' && len(getloclist(0)) == 0
619 echo "Location List is Empty."
629 nmap <silent> \l :call ToggleList("Location List", 'l')<CR>
630 nmap <silent> \q :call ToggleList("Quickfix List", 'c')<CR>
632 " DiffToggle -------------------------------------------------------------- {{{
633 "if !exists(":DiffToggle")
636 function! DiffToggle()
638 diffoff | wincmd l | :q
640 exec ":VCSVimDiff" | wincmd h
643 nnoremap \d :call DiffToggle()<CR>
644 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
649 "nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
650 nnoremap <silent> <cr> @=(foldlevel('.')?'za':"\<Space>")<CR>
651 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
653 " https://bitbucket.org/sjl/dotfiles/src/tip/vim/vimrc
654 " Make sure Vim returns to the same line when you reopen a file.
659 \ if line("'\"") > 0 && line("'\"") <= line("$") |
660 \ execute 'normal! g`"zvzz' |
664 iabbrev -... <C-R>=repeat('-', 80 - col(".") - 4 ) . " {{{"
668 " to show the key sequence when pressing some key,
674 " some prefix for mapping
681 nnoremap <C-N> :cn<CR>zzzv
682 nnoremap <C-P> :cp<CR>zzzv
683 "http://dougblack.io/words/a-good-vimrc.html
686 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:vsp<CR>:wincmd w<cr>:exec("tag ". word)<cr>
687 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zz:wincmd w<cr>
688 " command in normal mode, and visual mode
691 " gn select search and in visual mode
692 " confirm when using :q to quit the last tab page,
693 "Alias q if\ winnr('$')>1||tabpagenr('$')>1||confirm('Really\ quit?',\ "&OK\\n&Cancel")==1|quit|endif
697 " color of current line
699 nnoremap <Leader>m :marks abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<CR>:normal '
701 "let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript',
702 " \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir']