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'
42 Plugin 'vimperator/vimperator.vim'
45 filetype plugin indent on
48 " Basic options ----------------------------------------------------------- {{{
64 set diffopt=filler,vertical
67 set listchars=tab:▸\ ,eol:¬,extends:❯,precedes:❮
75 set completeopt=longest,menuone
77 "set wildmode=list:longest
79 set wildignore=*.o,*.obj,*~,*.swp,*.DS_Store,*.git,*.svn,*.hg
84 set nostartofline " don't jump to first character when paging
87 "set textwidth, formatoptions for chinese
94 set macmeta "" Macvim only
97 set guifont=Source\ Code\ Pro\ Light:h11
98 highlight Cursor guifg=white guibg=green
99 set guicursor=a:blinkon0
105 colorscheme molokai22
106 " http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users
107 "https://gist.github.com/andyfowler/1195581
109 let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
110 let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
112 let &t_SI = "\<Esc>]50;CursorShape=1\x7"
113 let &t_EI = "\<Esc>]50;CursorShape=0\x7"
119 " Mappings ---------------------------------------------------------------- {{{
122 " Normal mode ------------------------------------------------------------- {{{
129 nmap <Leader>w :w<CR>
130 nmap <Leader>q :q<CR>
131 nmap <Leader>e :e<Space>
132 nmap <Leader>W :w !sudo tee %<CR>
133 nmap <Leader>h :vertical help<Space>
134 nmap <Leader>t :tabedit %<Space>
135 "nmap <Leader>x :x<CR>
142 nnoremap <Leader>v <C-W>v
143 nnoremap <Leader>s <C-W>s
151 nnoremap <C-D> <C-D>zz
152 nnoremap <C-U> <C-U>zz
154 "nnoremap <SPACE> <C-F>
155 nnoremap <S-SPACE> <C-B>
159 "nmap <A-TAB> :bn<CR>
160 " map <A-TAB> Alt+TAB
161 "noremap <A-S-TAB> "input C-V then input key sequence to
162 "http://vim.wikia.com/wiki/Make_Shift-Tab_work
163 "nnoremap <ESC><TAB> :bn<CR>
164 nnoremap <ESC><TAB> :tabnext<CR>
165 "nnoremap
\e\19 :bp<CR>
166 nnoremap
\e\19 :tabprevious<CR>
167 "nmap <A-S-TAB> :bp<CR>
168 "nmap <A-SPACE> :b#<CR>
169 "nmap <Leader>d :bd<CR>
170 "" keymappig for register operations
171 ""TODO check if this already mapping
172 "nnoremap <Leader>r :registers<CR>
173 "noremap <Leader>x :<C-p>
177 " also works :r !pbpaste<CR>
179 nmap <A-=> :resize<CR>:vertical resize<CR>
180 nmap
\e= :resize<CR>:vertical resize<CR>
193 noremap <Leader>z zmzvzz
194 nmap \\ :nohlsearch<CR>
196 " Insert mode ------------------------------------------------------------- {{{
198 inoremap <C-U> <C-G>u<C-U>
199 inoremap <C-a> <Home>
202 inoremap <C-b> <S-Left>
203 inoremap <C-f> <S-Right>
204 imap <A-d> <S-Right><C-w>
206 " Command mode ------------------------------------------------------- {{{
208 cnoremap <C-A> <Home>
210 cnoremap <C-B> <Left>
211 cnoremap <C-F> <Right>
215 if has("gui_running")
216 " only for Macvim <D-Left> D is Command key
220 cnoremap <A-b> <S-Left>
221 cnoremap <A-f> <S-Right>
222 cnoremap <A-d> <S-Right><S-Right><S-Left><C-w>
224 cnoremap
\eb <S-Left>
225 cnoremap
\ef <S-Right>
226 cnoremap
\ed <S-Right><S-Right><S-Left><C-w>
228 " delet a word left of cursor
231 " Visual mode ------------------------------------------------------------- {{{
232 "" key mapping for visul mode
241 vnoremap <Leader>p "*p
242 "search for visually selectecd text
243 vnoremap // y/<C-R>"<CR>
247 " Plugins Configuration --------------------------------------------------- {{{
248 " Fuzzy Finder ------------------------------------------------------------ {{{
249 let g:fuf_modesDisable = []
250 let g:fuf_mrufile_maxItem = 400
251 let g:fuf_mrucmd_maxItem = 400
252 let g:fuf_file_exclude = '\v\~$|\.(DS_Store|o|exe|dll|bak|orig|swp|pyc)$|(^|[/\\])\.(hg|git|bzr|svn)($|[/\\])'
253 let g:fuf_buffertag_ctagsPath = '/usr/local/bin/ctags'
254 let g:fuf_enumeratingLimit = 30
255 nnoremap <silent> sj :FufBuffer<CR>
256 nnoremap <silent> sk :FufFileWithCurrentBufferDir<CR>
257 nnoremap <silent> sK :FufFileWithFullCwd<CR>
258 nnoremap <silent> s<C-k> :FufFile<CR>
259 "nnoremap <silent> sl :FufCoverageFileChange<CR>
260 "nnoremap <silent> sL :FufCoverageFileChange<CR>
261 "nnoremap <silent> s<C-l> :FufCoverageFileRegister<CR>
262 nnoremap <silent> sd :FufDirWithCurrentBufferDir<CR>
263 nnoremap <silent> sD :FufDirWithFullCwd<CR>
264 nnoremap <silent> s<C-d> :FufDir<CR>
265 nnoremap <silent> sn :FufMruFile<CR>
266 nnoremap <silent> sN :FufMruFileInCwd<CR>
267 nnoremap <silent> sm :FufMruCmd<CR>
268 "nnoremap <silent> su :FufBookmarkFile<CR>
269 nnoremap <silent> s<C-u> :FufBookmarkFileAdd<CR>
270 "vnoremap <silent> s<C-u> :FufBookmarkFileAddAsSelectedText<CR>
271 nnoremap <silent> si :FufBookmarkDir<CR>
272 nnoremap <silent> s<C-i> :FufBookmarkDirAdd<CR>
273 nnoremap <silent> sT :FufTag<CR>
274 nnoremap <silent> st :FufTag!<CR>
275 nnoremap <silent> s<C-]> :FufTagWithCursorWord!<CR>
276 nnoremap <silent> s, :FufBufferTag<CR>
277 nnoremap <silent> s< :FufBufferTag!<CR>
278 "vnoremap <silent> s, :FufBufferTagWithSelectedText!<CR>
279 "vnoremap <silent> s< :FufBufferTagWithSelectedText<CR>
280 nnoremap <silent> s} :FufBufferTagWithCursorWord!<CR>
281 nnoremap <silent> sl :FufBufferTagAll<CR>
282 "nnoremap <silent> s. :FufBufferTagAll<CR>
283 nnoremap <silent> s> :FufBufferTagAll!<CR>
284 "vnoremap <silent> s. :FufBufferTagAllWithSelectedText!<CR>
285 "vnoremap <silent> s> :FufBufferTagAllWithSelectedText<CR>
286 "nnoremap <silent> s] :FufBufferTagAllWithCursorWord!<CR>
287 nnoremap <silent> sG :FufTaggedFile<CR>
288 nnoremap <silent> sg :FufTaggedFile!<CR>
289 "nnoremap <silent> so :FufJumpList<CR>
290 "nnoremap <silent> sp :FufChangeList<CR>
291 "nnoremap <silent> sq :FufQuickfix<CR>
292 "nnoremap <silent> sy :FufLine<CR>
293 " nnoremap <silent> sh :FufHelp<CR>
294 "nnoremap <silent> se :FufEditDataFile<CR>
295 nnoremap <silent> sr :FufRenewCache<CR>
297 " YouCompleteMe ----------------------------------------------------------- {{{
298 "syntax on, must before the YCM,
300 " Load YouCompleteMe only on OSX
302 let g:loaded_youcompleteme = 1
305 "let g:ycm_collect_identifiers_from_tags_files = 1
306 let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
307 " this is fix youcompleteme python error
308 "http://www.cnblogs.com/clivelee/p/4266559.html
309 "https://github.com/Valloric/YouCompleteMe/issues/18
310 "let g:ycm_path_to_python_interpreter= '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python'
311 let g:ycm_auto_trigger = 1
312 let g:ycm_seed_identifiers_with_syntax = 1
313 let g:ycm_show_diagnostics_ui = 0
314 let g:ycm_enable_diagnostic_signs = 0
315 set completeopt-=preview " disable preview windows for completion
316 let g:ycm_confirm_extra_conf = 0
317 " delete default mapping for <leader>d
318 let g:ycm_key_detailed_diagnostics = ''
321 " Airline ----------------------------------------------------------------- {{{
322 "if has("gui_running")
324 let g:airline_mode_map = {
338 let g:airline_theme = 'badwolf'
340 "if has("gui_running")
341 let g:airline_powerline_fonts=1
342 let g:airline_left_sep = ''
343 let g:airline_left_alt_sep = ''
344 let g:airline_right_sep = ''
345 let g:airline_right_alt_sep = ''
347 " let g:airline#extensions#tabline#show_buffers = 1
348 let g:airline#extensions#tabline#show_buffers = 0
349 let g:airline#extensions#tabline#enabled = 1
350 let g:airline#extensions#tabline#left_sep = ''
351 let g:airline#extensions#tabline#left_alt_sep =''
352 let g:airline#extensions#tagbar#enabled = 1
354 " let g:airline_powerline_fonts=1
355 " let g:airline_left_sep = ''
356 "" let g:airline_left_alt_sep = ''
357 " let g:airline_right_sep = ''
358 "" let g:airline_right_alt_sep = ''
360 " let g:airline#extensions#tabline#show_buffers = 0
361 " let g:airline#extensions#tabline#enabled = 1
362 " let g:airline#extensions#tabline#left_sep = ''
363 "" let g:airline#extensions#tabline#left_alt_sep =''
364 " let g:airline#extensions#tagbar#enabled = 1
367 " let g:airline_section_a = 'N'
368 let g:airline_section_b = '%f%m'
369 let g:airline_section_c = ''
370 let g:airline_section_x = '[%-.50{CurDir()}]'
371 let g:airline_section_y = '%y'
372 let g:airline_section_z = '%c, %l/%L %p%%'
373 let g:airline_section_warning = '' " (syntastic, whitespace)
376 set statusline=\ %<%F%m%=[%-.50{CurDir()}]\ %y\ %c,\ %l/%L\ \ %p%%\
378 let curdir = substitute(getcwd(), $HOME, "~", "g")
384 " NerdTree ---------------------------------------------------------------- {{{
385 " Fix keymapping conflict
386 nmap <unique> <Leader>, <Plug>MarkClear
387 nmap <Leader>n :NERDTreeToggle<CR>
388 nmap <Leader>N :NERDTreeFind<CR>
390 " AutoClose --------------------------------------------------------------- {{{
391 let g:AutoCloseProtectedRegions = ["Dialog", "ThoughBubble"]
393 " TagBar ------------------------------------------------------------------ {{{
394 noremap <Leader>f :TagbarToggle<CR><C-w>l
395 let Tlist_Ctags_Cmd="/usr/local/bin/ctags"
397 " Tcd --------------------------------------------------------------------- {{{
400 " cmdline-completion ------------------------------------------------------ {{{
401 "http://foocoder.com/blog/mei-ri-vimcha-jian-suo-jin-xian-shi-vim-indent-guides.html/
402 cmap <C-J> <Plug>CmdlineCompletionBackward
403 cmap <C-K> <Plug>CmdlineCompletionForward
405 " VSCCommand -------------------------------------------------------------- {{{
406 "" ============== VCSCommand.vim =====================
407 "let VCSCommandSVKExec='disabled no such executable'
408 let VCSCommandDeleteOnHide=1
409 let VCSCommandDisableMappings=1
410 "let VCSCommandEnableBufferSetup=1
411 "nmap <Leader>sd :VCSVimDiff<CR>
413 autocmd User VCSBufferCreated silent! nmap <unique> <buffer> q :bwipeout<cr> | setlocal nomodifiable
415 nmap <Leader>dg :diffget<CR>
417 " YankRing ---------------------------------------------------------------- {{{
418 let g:yankring_min_element_length = 2
420 let g:yankring_replace_n_pkey = '<A->>'
421 let g:yankring_replace_n_nkey = '<A-<>'
422 let g:yankring_history_dir = "$HOME/.vim/temp/"
424 " Gtags ------------------------------------------------------------------- {{{
425 if has("gui_running")
426 noremap <A-.> :Gtags<CR>
427 noremap <A-r> :Gtags -r<CR>
428 noremap <A-o> :Gtags -s<CR>
429 noremap <A-g> :Gtags -g<CR>
431 noremap
\e. :Gtags<CR>
432 noremap
\er :Gtags -r<CR>
433 " noremap j :Gtags -s<CR>
434 noremap
\eg :Gtags -g<CR>
437 " Marks ------------------------------------------------------------------- {{{
438 nmap \h <Plug>MarkSet
439 "nmap * <Plug>MarkSearchNext
440 "nmap # <Plug>MarkSearchPrev
442 " Gundo ------------------------------------------------------------------- {{{
443 " nnoremap <F5> :GundoToggle<CR>
445 " Bookmarks --------------------------------------------------------------- {{{
447 let g:bookmark_save_per_working_dir = 1
448 let g:bookmark_auto_close = 1
449 let g:bookmark_auto_save = 1
450 " unmap the default mapping in plugins
451 nmap <Plug>DisableBookmarkToggle <Plug>BookmarkToggle
452 nmap <Plug>DisableBookmarkAnnotate <Plug>BookmarkAnnotate
453 nmap <Plug>DisableBookmarkShowAll <Plug>BookmarkShowAll
454 nmap <Plug>DisableBookmarkNext <Plug>BookmarkNext
455 nmap <Plug>DisableBookmarkPrev <Plug>BookmarkPrev
456 nmap <Plug>DisableBookmarkClear <Plug>BookmarkClear
457 nmap <Plug>DisableBookmarkClearAll <Plug>BookmarkClearAll
459 nmap mm <Plug>BookmarkToggle
460 " nmap ,i <Plug>BookmarkAnnotate
461 nmap \m <Plug>BookmarkShowAll
462 let g:bookmark_center = 1
463 let g:bookmark_auto_close = 1
464 "let g:bookmark_highlight_lines = 1
465 " nmap ,j <Plug>BookmarkNext
466 " nmap ,k <Plug>BookmarkPrev
467 " nmap ,c <Plug>BookmarkClear
468 " nmap ,x <Plug>BookmarkClearAll
470 " EasyMotion -------------------------------------------------------------- {{{
471 map en <Plug>(easymotion-sn)
472 map ej <Plug>(easymotion-j)
473 map ek <Plug>(easymotion-k)
474 map eb <Plug>(easymotion-b)
475 map ew <Plug>(easymotion-w)
476 map ee <Plug>(easymotion-w)
477 map el <Plug>(easymotion-lineforward)
478 map eh <Plug>(easymotion-linebackward)
480 "map <SPACE>n <Plug>(easymotion-sn)
481 "map <SPACE>j <Plug>(easymotion-j)
482 "map <SPACE>k <Plug>(easymotion-k)
483 "map <SPACE>b <Plug>(easymotion-b)
484 "map <SPACE>w <Plug>(easymotion-w)
485 "map <SPACE>e <Plug>(easymotion-w)
486 "map <SPACE>l <Plug>(easymotion-lineforward)
487 "map <SPACE>h <Plug>(easymotion-linebackward)
490 " vim-latex --------------------------------------------------------------- {{{
491 "set grepprg=grep\ -nH\ $*
492 "let g:tex_flavor='latex'
494 "autocmd BufEnter *.tex set sw=2
495 "disable default mapping
496 imap #$ <Plug>IMAP_JumpForward
497 nmap #$ <Plug>IMAP_JumpForward
498 vmap #$ <Plug>IMAP_JumpForward
499 vmap #$ <Plug>IMAP_DeleteAndJumpForward
500 let g:Imap_FreezeImap=1
503 " FileType ---------------------------------------------------------------- {{{
504 autocmd BufNewFile,BufRead *.log set filetype=logecc
505 autocmd BufNewFile,BufRead *.log.[0-9] set filetype=logecc
506 autocmd BufNewFile,BufRead *tmux.conf set filetype=tmux
507 autocmd BufNewFile,BufRead SConstruct set filetype=python
508 autocmd BufNewFile,BufRead SConscript* set filetype=python
509 autocmd BufNewFile,BufReadPost *.md set filetype=markdown
510 autocmd BufNewFile,BufRead *.c set filetype=cpp
512 " http://vim.wikia.com/wiki/Update_the_diff_view_automatically
513 autocmd InsertLeave,BufWritePost,CursorHold * if &diff == 1 | diffupdate | endif
514 " setlocal nomodifiable for svn diff
515 autocmd BufWinEnter *.svn-base setlocal nomodifiable
517 autocmd WinEnter * nnoremap <buffer> gj @=(&diff)?']czz':'gj'<CR> |
518 \ nnoremap <buffer> gk @=(&diff)?'[czz':'gk'<CR>
520 autocmd FileType qf nnoremap <buffer> <silent> q :q<CR> | setlocal nowrap | setlocal nocursorline
521 autocmd FileType help nnoremap <buffer> <silent> q :q<CR> | vertical resize 85;
522 autocmd FileType c,cpp setlocal foldmethod=syntax |
523 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
524 \ inoremap <buffer> { {<CR>}<ESC>kA<CR>|
525 \ nnoremap <buffer> <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zzzr:wincmd w<cr>
526 autocmd FileType python setlocal foldmethod=indent |
529 autocmd FileType xml setlocal foldmethod=syntax |
530 \ let g:xml_syntax_folding=1
531 autocmd FileType vim setlocal foldmethod=marker |
532 \ setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
533 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("", "{} \"")
535 autocmd FileType perl setlocal foldmethod=syntax |
536 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
537 \ inoremap <buffer> {<CR> {<CR>}<ESC>kA<CR>
539 autocmd Filetype markdown setlocal textwidth=80
541 autocmd CmdwinEnter * map <buffer> q :q<CR>
544 " Functions --------------------------------------------------------------- {{{
545 " DiffOrig ---------------------------------------------------------------- {{{
546 " refert vimrc_example.vim
547 " Convenient command to see the difference between the current buffer and the
548 " file it was loaded from, thus the changes you made.
549 " Only define it when not defined already.
550 if !exists(":DiffOrig")
551 command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
552 \ | wincmd p | diffthis
555 " Fold Quickfix ----------------------------------------------------------- {{{
556 "http://vim.wikia.com/wiki/Show_only_lines_in_quickfix_list_for_current_buffer
557 if ! exists('g:foldmisses_context')
558 let g:foldmisses_context = 0
561 " Add manual fold from line1 to line2, inclusive.
562 function! s:Fold(line1, line2)
564 execute a:line1.','.a:line2.'fold'
568 " Return list of line numbers for current buffer found in quickfix list.
569 function! s:GetHitLineNumbers(list)
572 if d.valid && d.bufnr == bufnr('')
573 call add(result, d.lnum)
579 function! s:FoldMisses(list, context)
580 setlocal foldmethod=manual
582 let extra = a:context == 99999 ? g:foldmisses_context : a:context
584 for lnum in s:GetHitLineNumbers(a:list)
585 " let start = last==0 ? 1 : last+extra
586 let start = last==0 ? 1 : last+1+extra
587 call s:Fold(start, lnum-1-extra)
590 call s:Fold(last+1+extra, line('$'))
591 " call s:Fold(last+extra, line('$'))
594 ":[N]FoldMisses [N] Show only the lines (and surrounding [N] lines
595 ":[N]FoldLMisses [N] of context) in the current buffer that appear
596 " in the quickfix / location list.
597 " Missed, error-free lines are folded away.
598 command! -bar -count=99999 FoldMisses call s:FoldMisses(getqflist(), <count>)
599 command! -bar -count=99999 FoldLMisses call s:FoldMisses(getloclist(0), <count>)
601 " ToggleList -------------------------------------------------------------- {{{
602 "http://vim.wikia.com/wiki/Toggle_to_open_or_close_the_quickfix_window
603 function! GetBufferList()
610 function! ToggleList(bufname, pfx)
611 let buflist = GetBufferList()
612 for bufnum in map(filter(split(buflist, '\n'), 'v:val =~ "'.a:bufname.'"'), 'str2nr(matchstr(v:val, "\\d\\+"))')
613 if bufwinnr(bufnum) != -1
618 if a:pfx == 'l' && len(getloclist(0)) == 0
620 echo "Location List is Empty."
630 nmap <silent> \l :call ToggleList("Location List", 'l')<CR>
631 nmap <silent> \q :call ToggleList("Quickfix List", 'c')<CR>
633 " DiffToggle -------------------------------------------------------------- {{{
634 "if !exists(":DiffToggle")
637 function! DiffToggle()
639 diffoff | wincmd l | :q
641 exec ":VCSVimDiff" | wincmd h
644 nnoremap \d :call DiffToggle()<CR>
645 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
650 "nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
651 nnoremap <silent> <cr> @=(foldlevel('.')?'za':"\<Space>")<CR>
652 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
654 " https://bitbucket.org/sjl/dotfiles/src/tip/vim/vimrc
655 " Make sure Vim returns to the same line when you reopen a file.
660 \ if line("'\"") > 0 && line("'\"") <= line("$") |
661 \ execute 'normal! g`"zvzz' |
665 iabbrev -... <C-R>=repeat('-', 80 - col(".") - 4 ) . " {{{"
669 " to show the key sequence when pressing some key,
675 " some prefix for mapping
682 nnoremap <C-N> :cn<CR>zzzv
683 nnoremap <C-P> :cp<CR>zzzv
684 "http://dougblack.io/words/a-good-vimrc.html
687 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:vsp<CR>:wincmd w<cr>:exec("tag ". word)<cr>
688 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zz:wincmd w<cr>
689 " command in normal mode, and visual mode
692 " gn select search and in visual mode
693 " confirm when using :q to quit the last tab page,
694 "Alias q if\ winnr('$')>1||tabpagenr('$')>1||confirm('Really\ quit?',\ "&OK\\n&Cancel")==1|quit|endif
698 " color of current line
700 nnoremap <Leader>m :marks abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<CR>:normal '
702 "let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript',
703 " \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir']