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 backspace=indent,eol,start
88 "set textwidth, formatoptions for chinese
95 set macmeta "" Macvim only
98 set guifont=Source\ Code\ Pro\ Light:h11
99 highlight Cursor guifg=white guibg=green
100 set guicursor=a:blinkon0
106 colorscheme molokai22
107 " http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users
108 "https://gist.github.com/andyfowler/1195581
110 let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
111 let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
113 let &t_SI = "\<Esc>]50;CursorShape=1\x7"
114 let &t_EI = "\<Esc>]50;CursorShape=0\x7"
120 " Mappings ---------------------------------------------------------------- {{{
125 " Normal mode ------------------------------------------------------------- {{{
132 nmap <Leader>w :w<CR>
133 nmap <Leader>q :q<CR>
134 nmap <Leader>e :e<Space>
135 nmap <Leader>W :w !sudo tee %<CR>
136 nmap <Leader>h :vertical help<Space>
137 nmap <Leader>t :tabedit %<Space>
138 "nmap <Leader>x :x<CR>
145 nnoremap <Leader>v <C-W>v
146 nnoremap <Leader>s <C-W>s
154 nnoremap <C-D> <C-D>zz
155 nnoremap <C-U> <C-U>zz
157 "nnoremap <SPACE> <C-F>
158 nnoremap <S-SPACE> <C-B>
162 "nmap <A-TAB> :bn<CR>
163 " map <A-TAB> Alt+TAB
164 "noremap <A-S-TAB> "input C-V then input key sequence to
165 "http://vim.wikia.com/wiki/Make_Shift-Tab_work
166 "nnoremap <ESC><TAB> :bn<CR>
167 nnoremap <ESC><TAB> :tabnext<CR>
168 "nnoremap
\e\19 :bp<CR>
169 nnoremap
\e\19 :tabprevious<CR>
170 "nmap <A-S-TAB> :bp<CR>
171 "nmap <A-SPACE> :b#<CR>
172 "nmap <Leader>d :bd<CR>
173 "" keymappig for register operations
174 ""TODO check if this already mapping
175 "nnoremap <Leader>r :registers<CR>
176 "noremap <Leader>x :<C-p>
180 " also works :r !pbpaste<CR>
182 nmap <A-=> :resize<CR>:vertical resize<CR>
183 nmap
\e= :resize<CR>:vertical resize<CR>
196 noremap <Leader>z zmzvzz
197 nmap \\ :nohlsearch<CR>
199 " Insert mode ------------------------------------------------------------- {{{
201 inoremap <C-U> <C-G>u<C-U>
202 inoremap <C-a> <Home>
205 inoremap <C-b> <Left>
206 inoremap <C-f> <Right>
207 inoremap <C-/> <Esc>ui
208 imap <A-d> <S-Right><C-w>
210 " Command mode ------------------------------------------------------- {{{
212 cnoremap <C-A> <Home>
214 cnoremap <C-B> <Left>
215 cnoremap <C-F> <Right>
219 if has("gui_running")
220 " only for Macvim <D-Left> D is Command key
224 cnoremap <A-b> <S-Left>
225 cnoremap <A-f> <S-Right>
226 cnoremap <A-d> <S-Right><S-Right><S-Left><C-w>
228 cnoremap
\eb <S-Left>
229 cnoremap
\ef <S-Right>
230 cnoremap
\ed <S-Right><S-Right><S-Left><C-w>
232 " delet a word left of cursor
235 " Visual mode ------------------------------------------------------------- {{{
236 "" key mapping for visul mode
245 vnoremap <Leader>p "*p
246 "search for visually selectecd text
247 vnoremap // y/<C-R>"<CR>
251 " Plugins Configuration --------------------------------------------------- {{{
252 " Fuzzy Finder ------------------------------------------------------------ {{{
253 let g:fuf_modesDisable = []
254 let g:fuf_mrufile_maxItem = 400
255 let g:fuf_mrucmd_maxItem = 400
256 let g:fuf_file_exclude = '\v\~$|\.(DS_Store|o|exe|dll|bak|orig|swp|pyc)$|(^|[/\\])\.(hg|git|bzr|svn)($|[/\\])'
257 let g:fuf_buffertag_ctagsPath = '/usr/local/bin/ctags'
258 let g:fuf_enumeratingLimit = 30
259 nnoremap <silent> sj :FufBuffer<CR>
260 nnoremap <silent> sk :FufFileWithCurrentBufferDir<CR>
261 nnoremap <silent> sK :FufFileWithFullCwd<CR>
262 nnoremap <silent> s<C-k> :FufFile<CR>
263 "nnoremap <silent> sl :FufCoverageFileChange<CR>
264 "nnoremap <silent> sL :FufCoverageFileChange<CR>
265 "nnoremap <silent> s<C-l> :FufCoverageFileRegister<CR>
266 nnoremap <silent> sd :FufDirWithCurrentBufferDir<CR>
267 nnoremap <silent> sD :FufDirWithFullCwd<CR>
268 nnoremap <silent> s<C-d> :FufDir<CR>
269 nnoremap <silent> sn :FufMruFile<CR>
270 nnoremap <silent> sN :FufMruFileInCwd<CR>
271 nnoremap <silent> sm :FufMruCmd<CR>
272 "nnoremap <silent> su :FufBookmarkFile<CR>
273 nnoremap <silent> s<C-u> :FufBookmarkFileAdd<CR>
274 "vnoremap <silent> s<C-u> :FufBookmarkFileAddAsSelectedText<CR>
275 nnoremap <silent> si :FufBookmarkDir<CR>
276 nnoremap <silent> s<C-i> :FufBookmarkDirAdd<CR>
277 nnoremap <silent> sT :FufTag<CR>
278 nnoremap <silent> st :FufTag!<CR>
279 nnoremap <silent> s<C-]> :FufTagWithCursorWord!<CR>
280 nnoremap <silent> s, :FufBufferTag<CR>
281 nnoremap <silent> s< :FufBufferTag!<CR>
282 "vnoremap <silent> s, :FufBufferTagWithSelectedText!<CR>
283 "vnoremap <silent> s< :FufBufferTagWithSelectedText<CR>
284 nnoremap <silent> s} :FufBufferTagWithCursorWord!<CR>
285 nnoremap <silent> sl :FufBufferTagAll<CR>
286 "nnoremap <silent> s. :FufBufferTagAll<CR>
287 nnoremap <silent> s> :FufBufferTagAll!<CR>
288 "vnoremap <silent> s. :FufBufferTagAllWithSelectedText!<CR>
289 "vnoremap <silent> s> :FufBufferTagAllWithSelectedText<CR>
290 "nnoremap <silent> s] :FufBufferTagAllWithCursorWord!<CR>
291 nnoremap <silent> sG :FufTaggedFile<CR>
292 nnoremap <silent> sg :FufTaggedFile!<CR>
293 "nnoremap <silent> so :FufJumpList<CR>
294 "nnoremap <silent> sp :FufChangeList<CR>
295 "nnoremap <silent> sq :FufQuickfix<CR>
296 "nnoremap <silent> sy :FufLine<CR>
297 " nnoremap <silent> sh :FufHelp<CR>
298 "nnoremap <silent> se :FufEditDataFile<CR>
299 nnoremap <silent> sr :FufRenewCache<CR>
301 " YouCompleteMe ----------------------------------------------------------- {{{
302 "syntax on, must before the YCM,
304 " Load YouCompleteMe only on OSX
306 let g:loaded_youcompleteme = 1
309 "let g:ycm_collect_identifiers_from_tags_files = 1
310 let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
311 " this is fix youcompleteme python error
312 "http://www.cnblogs.com/clivelee/p/4266559.html
313 "https://github.com/Valloric/YouCompleteMe/issues/18
314 "let g:ycm_path_to_python_interpreter= '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python'
315 let g:ycm_auto_trigger = 1
316 let g:ycm_seed_identifiers_with_syntax = 1
317 let g:ycm_show_diagnostics_ui = 0
318 let g:ycm_enable_diagnostic_signs = 0
319 set completeopt-=preview " disable preview windows for completion
320 let g:ycm_confirm_extra_conf = 0
321 " delete default mapping for <leader>d
322 let g:ycm_key_detailed_diagnostics = ''
325 " Airline ----------------------------------------------------------------- {{{
326 "if has("gui_running")
328 let g:airline_mode_map = {
342 let g:airline_theme = 'badwolf'
344 "if has("gui_running")
345 let g:airline_powerline_fonts=1
346 let g:airline_left_sep = ''
347 let g:airline_left_alt_sep = ''
348 let g:airline_right_sep = ''
349 let g:airline_right_alt_sep = ''
351 " let g:airline#extensions#tabline#show_buffers = 1
352 let g:airline#extensions#tabline#show_buffers = 0
353 let g:airline#extensions#tabline#enabled = 1
354 let g:airline#extensions#tabline#left_sep = ''
355 let g:airline#extensions#tabline#left_alt_sep =''
356 let g:airline#extensions#tagbar#enabled = 1
358 " let g:airline_powerline_fonts=1
359 " let g:airline_left_sep = ''
360 "" let g:airline_left_alt_sep = ''
361 " let g:airline_right_sep = ''
362 "" let g:airline_right_alt_sep = ''
364 " let g:airline#extensions#tabline#show_buffers = 0
365 " let g:airline#extensions#tabline#enabled = 1
366 " let g:airline#extensions#tabline#left_sep = ''
367 "" let g:airline#extensions#tabline#left_alt_sep =''
368 " let g:airline#extensions#tagbar#enabled = 1
371 " let g:airline_section_a = 'N'
372 let g:airline_section_b = '%f%m'
373 let g:airline_section_c = ''
374 let g:airline_section_x = '[%-.50{CurDir()}]'
375 let g:airline_section_y = '%y'
376 let g:airline_section_z = '%c, %l/%L %p%%'
377 let g:airline_section_warning = '' " (syntastic, whitespace)
380 set statusline=\ %<%F%m%=[%-.50{CurDir()}]\ %y\ %c,\ %l/%L\ \ %p%%\
382 let curdir = substitute(getcwd(), $HOME, "~", "g")
388 " NerdTree ---------------------------------------------------------------- {{{
389 " Fix keymapping conflict
390 nmap <unique> <Leader>, <Plug>MarkClear
391 nmap <Leader>n :NERDTreeToggle<CR>
392 nmap <Leader>N :NERDTreeFind<CR>
394 " AutoClose --------------------------------------------------------------- {{{
395 let g:AutoCloseProtectedRegions = ["Dialog", "ThoughBubble"]
397 " TagBar ------------------------------------------------------------------ {{{
398 noremap <Leader>f :TagbarToggle<CR><C-w>l
399 let Tlist_Ctags_Cmd="/usr/local/bin/ctags"
401 " Tcd --------------------------------------------------------------------- {{{
404 " cmdline-completion ------------------------------------------------------ {{{
405 "http://foocoder.com/blog/mei-ri-vimcha-jian-suo-jin-xian-shi-vim-indent-guides.html/
406 cmap <C-J> <Plug>CmdlineCompletionBackward
407 cmap <C-K> <Plug>CmdlineCompletionForward
409 " VSCCommand -------------------------------------------------------------- {{{
410 "" ============== VCSCommand.vim =====================
411 "let VCSCommandSVKExec='disabled no such executable'
412 let VCSCommandDeleteOnHide=1
413 let VCSCommandDisableMappings=1
414 "let VCSCommandEnableBufferSetup=1
415 "nmap <Leader>sd :VCSVimDiff<CR>
417 autocmd User VCSBufferCreated silent! nmap <unique> <buffer> q :bwipeout<cr> | setlocal nomodifiable
419 nmap <Leader>dg :diffget<CR>
421 " YankRing ---------------------------------------------------------------- {{{
422 let g:yankring_min_element_length = 2
424 let g:yankring_replace_n_pkey = '<A->>'
425 let g:yankring_replace_n_nkey = '<A-<>'
426 let g:yankring_history_dir = "$HOME/.vim/temp/"
428 " Gtags ------------------------------------------------------------------- {{{
429 if has("gui_running")
430 noremap <A-.> :Gtags<CR>
431 noremap <A-r> :Gtags -r<CR>
432 noremap <A-o> :Gtags -s<CR>
433 noremap <A-g> :Gtags -g<CR>
435 noremap
\e. :Gtags<CR>
436 noremap
\er :Gtags -r<CR>
437 " noremap j :Gtags -s<CR>
438 noremap
\eg :Gtags -g<CR>
441 " Marks ------------------------------------------------------------------- {{{
442 nmap \h <Plug>MarkSet
443 "nmap * <Plug>MarkSearchNext
444 "nmap # <Plug>MarkSearchPrev
446 " Gundo ------------------------------------------------------------------- {{{
447 " nnoremap <F5> :GundoToggle<CR>
449 " Bookmarks --------------------------------------------------------------- {{{
451 let g:bookmark_save_per_working_dir = 1
452 let g:bookmark_auto_close = 1
453 let g:bookmark_auto_save = 1
454 " unmap the default mapping in plugins
455 nmap <Plug>DisableBookmarkToggle <Plug>BookmarkToggle
456 nmap <Plug>DisableBookmarkAnnotate <Plug>BookmarkAnnotate
457 nmap <Plug>DisableBookmarkShowAll <Plug>BookmarkShowAll
458 nmap <Plug>DisableBookmarkNext <Plug>BookmarkNext
459 nmap <Plug>DisableBookmarkPrev <Plug>BookmarkPrev
460 nmap <Plug>DisableBookmarkClear <Plug>BookmarkClear
461 nmap <Plug>DisableBookmarkClearAll <Plug>BookmarkClearAll
463 nmap mm <Plug>BookmarkToggle
464 " nmap ,i <Plug>BookmarkAnnotate
465 nmap \m <Plug>BookmarkShowAll
466 let g:bookmark_center = 1
467 let g:bookmark_auto_close = 1
468 "let g:bookmark_highlight_lines = 1
469 " nmap ,j <Plug>BookmarkNext
470 " nmap ,k <Plug>BookmarkPrev
471 " nmap ,c <Plug>BookmarkClear
472 " nmap ,x <Plug>BookmarkClearAll
474 " EasyMotion -------------------------------------------------------------- {{{
475 map en <Plug>(easymotion-sn)
476 map ej <Plug>(easymotion-j)
477 map ek <Plug>(easymotion-k)
478 map eb <Plug>(easymotion-b)
479 map ew <Plug>(easymotion-w)
480 map ee <Plug>(easymotion-w)
481 map el <Plug>(easymotion-lineforward)
482 map eh <Plug>(easymotion-linebackward)
484 "map <SPACE>n <Plug>(easymotion-sn)
485 "map <SPACE>j <Plug>(easymotion-j)
486 "map <SPACE>k <Plug>(easymotion-k)
487 "map <SPACE>b <Plug>(easymotion-b)
488 "map <SPACE>w <Plug>(easymotion-w)
489 "map <SPACE>e <Plug>(easymotion-w)
490 "map <SPACE>l <Plug>(easymotion-lineforward)
491 "map <SPACE>h <Plug>(easymotion-linebackward)
494 " vim-latex --------------------------------------------------------------- {{{
495 "set grepprg=grep\ -nH\ $*
496 "let g:tex_flavor='latex'
498 "autocmd BufEnter *.tex set sw=2
499 "disable default mapping
500 imap #$ <Plug>IMAP_JumpForward
501 nmap #$ <Plug>IMAP_JumpForward
502 vmap #$ <Plug>IMAP_JumpForward
503 vmap #$ <Plug>IMAP_DeleteAndJumpForward
504 let g:Imap_FreezeImap=1
507 " FileType ---------------------------------------------------------------- {{{
508 autocmd BufNewFile,BufRead *.log set filetype=logecc
509 autocmd BufNewFile,BufRead *.log.[0-9] set filetype=logecc
510 autocmd BufNewFile,BufRead *tmux.conf set filetype=tmux
511 autocmd BufNewFile,BufRead SConstruct set filetype=python
512 autocmd BufNewFile,BufRead SConscript* set filetype=python
513 autocmd BufNewFile,BufReadPost *.md set filetype=markdown
514 autocmd BufNewFile,BufRead *.c set filetype=cpp
516 " http://vim.wikia.com/wiki/Update_the_diff_view_automatically
517 autocmd InsertLeave,BufWritePost,CursorHold * if &diff == 1 | diffupdate | endif
518 " setlocal nomodifiable for svn diff
519 autocmd BufWinEnter *.svn-base setlocal nomodifiable
521 autocmd WinEnter * nnoremap <buffer> gj @=(&diff)?']czz':'gj'<CR> |
522 \ nnoremap <buffer> gk @=(&diff)?'[czz':'gk'<CR>
524 autocmd FileType qf nnoremap <buffer> <silent> q :q<CR> | setlocal nowrap | setlocal nocursorline
525 autocmd FileType help nnoremap <buffer> <silent> q :q<CR> | vertical resize 85;
526 autocmd FileType c,cpp setlocal foldmethod=syntax |
527 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
528 \ inoremap <buffer> { {<CR>}<ESC>kA<CR>|
529 \ nnoremap <buffer> <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zzzr:wincmd w<cr>
530 autocmd FileType python setlocal foldmethod=indent |
533 autocmd FileType xml setlocal foldmethod=syntax |
534 \ let g:xml_syntax_folding=1
535 autocmd FileType vim setlocal foldmethod=marker |
536 \ setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
537 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("", "{} \"")
539 autocmd FileType perl setlocal foldmethod=syntax |
540 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
541 \ inoremap <buffer> {<CR> {<CR>}<ESC>kA<CR>
543 autocmd Filetype markdown setlocal textwidth=80
545 autocmd CmdwinEnter * map <buffer> q :q<CR>
548 " Functions --------------------------------------------------------------- {{{
549 " DiffOrig ---------------------------------------------------------------- {{{
550 " refert vimrc_example.vim
551 " Convenient command to see the difference between the current buffer and the
552 " file it was loaded from, thus the changes you made.
553 " Only define it when not defined already.
554 if !exists(":DiffOrig")
555 command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
556 \ | wincmd p | diffthis
559 " Fold Quickfix ----------------------------------------------------------- {{{
560 "http://vim.wikia.com/wiki/Show_only_lines_in_quickfix_list_for_current_buffer
561 if ! exists('g:foldmisses_context')
562 let g:foldmisses_context = 0
565 " Add manual fold from line1 to line2, inclusive.
566 function! s:Fold(line1, line2)
568 execute a:line1.','.a:line2.'fold'
572 " Return list of line numbers for current buffer found in quickfix list.
573 function! s:GetHitLineNumbers(list)
576 if d.valid && d.bufnr == bufnr('')
577 call add(result, d.lnum)
583 function! s:FoldMisses(list, context)
584 setlocal foldmethod=manual
586 let extra = a:context == 99999 ? g:foldmisses_context : a:context
588 for lnum in s:GetHitLineNumbers(a:list)
589 " let start = last==0 ? 1 : last+extra
590 let start = last==0 ? 1 : last+1+extra
591 call s:Fold(start, lnum-1-extra)
594 call s:Fold(last+1+extra, line('$'))
595 " call s:Fold(last+extra, line('$'))
598 ":[N]FoldMisses [N] Show only the lines (and surrounding [N] lines
599 ":[N]FoldLMisses [N] of context) in the current buffer that appear
600 " in the quickfix / location list.
601 " Missed, error-free lines are folded away.
602 command! -bar -count=99999 FoldMisses call s:FoldMisses(getqflist(), <count>)
603 command! -bar -count=99999 FoldLMisses call s:FoldMisses(getloclist(0), <count>)
605 " ToggleList -------------------------------------------------------------- {{{
606 "http://vim.wikia.com/wiki/Toggle_to_open_or_close_the_quickfix_window
607 function! GetBufferList()
614 function! ToggleList(bufname, pfx)
615 let buflist = GetBufferList()
616 for bufnum in map(filter(split(buflist, '\n'), 'v:val =~ "'.a:bufname.'"'), 'str2nr(matchstr(v:val, "\\d\\+"))')
617 if bufwinnr(bufnum) != -1
622 if a:pfx == 'l' && len(getloclist(0)) == 0
624 echo "Location List is Empty."
634 nmap <silent> \l :call ToggleList("Location List", 'l')<CR>
635 nmap <silent> \q :call ToggleList("Quickfix List", 'c')<CR>
637 " DiffToggle -------------------------------------------------------------- {{{
638 "if !exists(":DiffToggle")
641 function! DiffToggle()
643 diffoff | wincmd l | :q
645 exec ":VCSVimDiff" | wincmd h
648 nnoremap \d :call DiffToggle()<CR>
649 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
654 "nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
655 nnoremap <silent> <cr> @=(foldlevel('.')?'za':"\<Space>")<CR>
656 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
658 " https://bitbucket.org/sjl/dotfiles/src/tip/vim/vimrc
659 " Make sure Vim returns to the same line when you reopen a file.
664 \ if line("'\"") > 0 && line("'\"") <= line("$") |
665 \ execute 'normal! g`"zvzz' |
669 iabbrev -... <C-R>=repeat('-', 80 - col(".") - 4 ) . " {{{"
673 " to show the key sequence when pressing some key,
679 " some prefix for mapping
686 nnoremap <C-N> :cn<CR>zzzv
687 nnoremap <C-P> :cp<CR>zzzv
688 "http://dougblack.io/words/a-good-vimrc.html
691 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:vsp<CR>:wincmd w<cr>:exec("tag ". word)<cr>
692 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zz:wincmd w<cr>
693 " command in normal mode, and visual mode
696 " gn select search and in visual mode
697 " confirm when using :q to quit the last tab page,
698 "Alias q if\ winnr('$')>1||tabpagenr('$')>1||confirm('Really\ quit?',\ "&OK\\n&Cancel")==1|quit|endif
702 " color of current line
704 nnoremap <Leader>m :marks abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<CR>:normal '
706 "let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript',
707 " \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir']