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 'bling/vim-airline'
17 Bundle 'payneseu/nerdtree'
18 Bundle 'Townk/vim-autoclose'
19 Bundle 'majutsushi/tagbar'
20 Bundle 'vim-scripts/tcd.vim'
21 Bundle 'vim-scripts/cmdline-completion'
22 Bundle 'vim-scripts/vcscommand.vim'
23 Bundle 'Lokaltog/vim-easymotion'
24 "Bundle 'vim-scripts/YankRing.vim'
25 Bundle 'vim-scripts/gtags.vim'
26 Bundle 'kshenoy/vim-signature'
27 Bundle 'nathanaelkane/vim-indent-guides'
29 Bundle 'payneseu/mark-2.8.4'
30 "Bundle 'derekwyatt/vim-fswitch'
31 Bundle 'sjl/gundo.vim'
32 Bundle 'tpope/vim-markdown'
33 "Bundle 'vim-scripts/BreakPts'
34 "Bundle 'vim-scripts/genutils'
35 "Bundle 'vim-scripts/Marks-Browser'
36 Bundle 'MattesGroeger/vim-bookmarks'
37 "Bundle 'tpope/vim-repeat'
38 "Bundle 'kien/ctrlp.vim'
39 "disable since some conflicting mapping
40 Bundle 'vim-latex/vim-latex'
43 filetype plugin indent on
46 " Basic options ----------------------------------------------------------- {{{
62 set diffopt=filler,vertical
65 set listchars=tab:▸\ ,eol:¬,extends:❯,precedes:❮
73 set completeopt=longest,menuone
75 "set wildmode=list:longest
77 set wildignore=*.o,*.obj,*~,*.swp,*.DS_Store,*.git,*.svn,*.hg
82 set nostartofline " don't jump to first character when paging
85 "set textwidth, formatoptions for chinese
92 set macmeta "" Macvim only
95 set guifont=Sauce\ Code\ Powerline\ Light:h11
96 highlight Cursor guifg=white guibg=green
97 set guicursor=a:blinkon0
103 colorscheme molokai22
104 " http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users
105 "https://gist.github.com/andyfowler/1195581
107 let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
108 let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
110 let &t_SI = "\<Esc>]50;CursorShape=1\x7"
111 let &t_EI = "\<Esc>]50;CursorShape=0\x7"
117 " Mappings ---------------------------------------------------------------- {{{
120 " Normal mode ------------------------------------------------------------- {{{
127 nmap <Leader>w :w<CR>
128 nmap <Leader>q :q<CR>
129 nmap <Leader>e :e<Space>
130 nmap <Leader>W :w !sudo tee %<CR>
131 nmap <Leader>h :vertical help<Space>
132 nmap <Leader>t :tabedit %<Space>
133 "nmap <Leader>x :x<CR>
140 nnoremap <Leader>v <C-W>v
141 nnoremap <Leader>s <C-W>s
149 nnoremap <C-D> <C-D>zz
150 nnoremap <C-U> <C-U>zz
152 "nnoremap <SPACE> <C-F>
153 nnoremap <S-SPACE> <C-B>
157 "nmap <A-TAB> :bn<CR>
158 " map <A-TAB> Alt+TAB
159 "noremap <A-S-TAB> "input C-V then input key sequence to
160 "http://vim.wikia.com/wiki/Make_Shift-Tab_work
161 "nnoremap <ESC><TAB> :bn<CR>
162 nnoremap <ESC><TAB> :tabnext<CR>
163 "nnoremap
\e\19 :bp<CR>
164 nnoremap
\e\19 :tabprevious<CR>
165 "nmap <A-S-TAB> :bp<CR>
166 "nmap <A-SPACE> :b#<CR>
167 "nmap <Leader>d :bd<CR>
168 "" keymappig for register operations
169 nnoremap <Leader>r :registers<CR>
170 "noremap <Leader>x :<C-p>
176 nmap <A-=> :resize<CR>:vertical resize<CR>
177 nmap
\e= :resize<CR>:vertical resize<CR>
190 noremap <Leader>z zmzvzz
191 nmap \\ :nohlsearch<CR>
193 " Insert mode ------------------------------------------------------------- {{{
195 inoremap <C-U> <C-G>u<C-U>
196 inoremap <C-a> <Home>
199 inoremap <C-b> <S-Left>
200 inoremap <C-f> <S-Right>
201 imap <A-d> <S-Right><C-w>
203 " Command mode ------------------------------------------------------- {{{
205 cnoremap <C-A> <Home>
207 cnoremap <C-B> <Left>
208 cnoremap <C-F> <Right>
212 if has("gui_running")
213 " only for Macvim <D-Left> D is Command key
217 cnoremap <A-b> <S-Left>
218 cnoremap <A-f> <S-Right>
219 cnoremap <A-d> <S-Right><S-Right><S-Left><C-w>
221 cnoremap
\eb <S-Left>
222 cnoremap
\ef <S-Right>
223 cnoremap
\ed <S-Right><S-Right><S-Left><C-w>
225 " delet a word left of cursor
228 " Visual mode ------------------------------------------------------------- {{{
229 "" key mapping for visul mode
238 vnoremap <Leader>p "*p
239 "search for visually selectecd text
240 vnoremap // y/<C-R>"<CR>
244 " Plugins Configuration --------------------------------------------------- {{{
245 " Fuzzy Finder ------------------------------------------------------------ {{{
246 let g:fuf_modesDisable = []
247 let g:fuf_mrufile_maxItem = 400
248 let g:fuf_mrucmd_maxItem = 400
249 let g:fuf_file_exclude = '\v\~$|\.(DS_Store|o|exe|dll|bak|orig|swp|pyc)$|(^|[/\\])\.(hg|git|bzr|svn)($|[/\\])'
250 let g:fuf_buffertag_ctagsPath = '/usr/local/bin/ctags'
251 let g:fuf_enumeratingLimit = 30
252 nnoremap <silent> sj :FufBuffer<CR>
253 nnoremap <silent> sk :FufFileWithCurrentBufferDir<CR>
254 nnoremap <silent> sK :FufFileWithFullCwd<CR>
255 nnoremap <silent> s<C-k> :FufFile<CR>
256 "nnoremap <silent> sl :FufCoverageFileChange<CR>
257 "nnoremap <silent> sL :FufCoverageFileChange<CR>
258 "nnoremap <silent> s<C-l> :FufCoverageFileRegister<CR>
259 nnoremap <silent> sd :FufDirWithCurrentBufferDir<CR>
260 nnoremap <silent> sD :FufDirWithFullCwd<CR>
261 nnoremap <silent> s<C-d> :FufDir<CR>
262 nnoremap <silent> sn :FufMruFile<CR>
263 nnoremap <silent> sN :FufMruFileInCwd<CR>
264 nnoremap <silent> sm :FufMruCmd<CR>
265 "nnoremap <silent> su :FufBookmarkFile<CR>
266 nnoremap <silent> s<C-u> :FufBookmarkFileAdd<CR>
267 "vnoremap <silent> s<C-u> :FufBookmarkFileAddAsSelectedText<CR>
268 nnoremap <silent> si :FufBookmarkDir<CR>
269 nnoremap <silent> s<C-i> :FufBookmarkDirAdd<CR>
270 nnoremap <silent> sT :FufTag<CR>
271 nnoremap <silent> st :FufTag!<CR>
272 nnoremap <silent> s<C-]> :FufTagWithCursorWord!<CR>
273 nnoremap <silent> s, :FufBufferTag<CR>
274 nnoremap <silent> s< :FufBufferTag!<CR>
275 "vnoremap <silent> s, :FufBufferTagWithSelectedText!<CR>
276 "vnoremap <silent> s< :FufBufferTagWithSelectedText<CR>
277 nnoremap <silent> s} :FufBufferTagWithCursorWord!<CR>
278 nnoremap <silent> sl :FufBufferTagAll<CR>
279 "nnoremap <silent> s. :FufBufferTagAll<CR>
280 nnoremap <silent> s> :FufBufferTagAll!<CR>
281 "vnoremap <silent> s. :FufBufferTagAllWithSelectedText!<CR>
282 "vnoremap <silent> s> :FufBufferTagAllWithSelectedText<CR>
283 "nnoremap <silent> s] :FufBufferTagAllWithCursorWord!<CR>
284 nnoremap <silent> sG :FufTaggedFile<CR>
285 nnoremap <silent> sg :FufTaggedFile!<CR>
286 "nnoremap <silent> so :FufJumpList<CR>
287 "nnoremap <silent> sp :FufChangeList<CR>
288 "nnoremap <silent> sq :FufQuickfix<CR>
289 "nnoremap <silent> sy :FufLine<CR>
290 " nnoremap <silent> sh :FufHelp<CR>
291 "nnoremap <silent> se :FufEditDataFile<CR>
292 nnoremap <silent> sr :FufRenewCache<CR>
294 " YouCompleteMe ----------------------------------------------------------- {{{
295 "syntax on, must before the YCM,
297 "let g:ycm_collect_identifiers_from_tags_files = 1
298 let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
299 " this is fix youcompleteme python error
300 "http://www.cnblogs.com/clivelee/p/4266559.html
301 "https://github.com/Valloric/YouCompleteMe/issues/18
302 let g:ycm_path_to_python_interpreter= '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python'
303 let g:ycm_auto_trigger = 1
304 let g:ycm_seed_identifiers_with_syntax = 1
305 let g:ycm_show_diagnostics_ui = 0
306 let g:ycm_enable_diagnostic_signs = 0
307 set completeopt-=preview " disable preview windows for completion
308 let g:ycm_confirm_extra_conf = 0
309 " delete default mapping for <leader>d
310 let g:ycm_key_detailed_diagnostics = ''
313 " Airline ----------------------------------------------------------------- {{{
314 "if has("gui_running")
316 let g:airline_mode_map = {
330 let g:airline_theme = 'badwolf'
332 "if has("gui_running")
333 let g:airline_powerline_fonts=1
334 let g:airline_left_sep = ''
335 let g:airline_left_alt_sep = ''
336 let g:airline_right_sep = ''
337 let g:airline_right_alt_sep = ''
339 " let g:airline#extensions#tabline#show_buffers = 1
340 let g:airline#extensions#tabline#show_buffers = 0
341 let g:airline#extensions#tabline#enabled = 1
342 let g:airline#extensions#tabline#left_sep = ''
343 let g:airline#extensions#tabline#left_alt_sep =''
344 let g:airline#extensions#tagbar#enabled = 1
346 " let g:airline_powerline_fonts=1
347 " let g:airline_left_sep = ''
348 "" let g:airline_left_alt_sep = ''
349 " let g:airline_right_sep = ''
350 "" let g:airline_right_alt_sep = ''
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
359 " let g:airline_section_a = 'N'
360 let g:airline_section_b = '%f%m'
361 let g:airline_section_c = ''
362 let g:airline_section_x = '[%-.50{CurDir()}]'
363 let g:airline_section_y = '%y'
364 let g:airline_section_z = '%c, %l/%L %p%%'
365 let g:airline_section_warning = '' " (syntastic, whitespace)
368 set statusline=\ %<%F%m%=[%-.50{CurDir()}]\ %y\ %c,\ %l/%L\ \ %p%%\
370 let curdir = substitute(getcwd(), $HOME, "~", "g")
376 " NerdTree ---------------------------------------------------------------- {{{
377 nmap <Leader>n :NERDTreeToggle<CR>
378 nmap <Leader>N :NERDTreeFind<CR>
380 " AutoClose --------------------------------------------------------------- {{{
381 let g:AutoCloseProtectedRegions = ["Dialog", "ThoughBubble"]
383 " TagBar ------------------------------------------------------------------ {{{
384 noremap <Leader>f :TagbarToggle<CR><C-w>l
385 let Tlist_Ctags_Cmd="/usr/local/bin/ctags"
387 " Tcd --------------------------------------------------------------------- {{{
390 " cmdline-completion ------------------------------------------------------ {{{
391 "http://foocoder.com/blog/mei-ri-vimcha-jian-suo-jin-xian-shi-vim-indent-guides.html/
392 cmap <C-J> <Plug>CmdlineCompletionBackward
393 cmap <C-K> <Plug>CmdlineCompletionForward
395 " VSCCommand -------------------------------------------------------------- {{{
396 "" ============== VCSCommand.vim =====================
397 "let VCSCommandSVKExec='disabled no such executable'
398 let VCSCommandDeleteOnHide=1
399 let VCSCommandDisableMappings=1
400 "let VCSCommandEnableBufferSetup=1
401 "nmap <Leader>sd :VCSVimDiff<CR>
403 autocmd User VCSBufferCreated silent! nmap <unique> <buffer> q :bwipeout<cr> | setlocal nomodifiable
405 nmap <Leader>dg :diffget<CR>
407 " YankRing ---------------------------------------------------------------- {{{
408 let g:yankring_min_element_length = 2
410 let g:yankring_replace_n_pkey = '<A->>'
411 let g:yankring_replace_n_nkey = '<A-<>'
412 let g:yankring_history_dir = "$HOME/.vim/temp/"
414 " Gtags ------------------------------------------------------------------- {{{
415 if has("gui_running")
416 noremap <A-.> :Gtags<CR>
417 noremap <A-r> :Gtags -r<CR>
418 noremap <A-o> :Gtags -s<CR>
419 noremap <A-g> :Gtags -g<CR>
421 noremap
\e. :Gtags<CR>
422 noremap
\er :Gtags -r<CR>
423 " noremap j :Gtags -s<CR>
424 noremap
\eg :Gtags -g<CR>
427 " Marks ------------------------------------------------------------------- {{{
428 nmap \h <Plug>MarkSet
429 "nmap * <Plug>MarkSearchNext
430 "nmap # <Plug>MarkSearchPrev
432 " Gundo ------------------------------------------------------------------- {{{
433 " nnoremap <F5> :GundoToggle<CR>
435 " Bookmarks --------------------------------------------------------------- {{{
437 let g:bookmark_save_per_working_dir = 1
438 let g:bookmark_auto_close = 1
439 let g:bookmark_auto_save = 1
440 " unmap the default mapping in plugins
441 nmap <Plug>DisableBookmarkToggle <Plug>BookmarkToggle
442 nmap <Plug>DisableBookmarkAnnotate <Plug>BookmarkAnnotate
443 nmap <Plug>DisableBookmarkShowAll <Plug>BookmarkShowAll
444 nmap <Plug>DisableBookmarkNext <Plug>BookmarkNext
445 nmap <Plug>DisableBookmarkPrev <Plug>BookmarkPrev
446 nmap <Plug>DisableBookmarkClear <Plug>BookmarkClear
447 nmap <Plug>DisableBookmarkClearAll <Plug>BookmarkClearAll
449 nmap mm <Plug>BookmarkToggle
450 " nmap ,i <Plug>BookmarkAnnotate
451 nmap \m <Plug>BookmarkShowAll
452 let g:bookmark_center = 1
453 let g:bookmark_auto_close = 1
454 "let g:bookmark_highlight_lines = 1
455 " nmap ,j <Plug>BookmarkNext
456 " nmap ,k <Plug>BookmarkPrev
457 " nmap ,c <Plug>BookmarkClear
458 " nmap ,x <Plug>BookmarkClearAll
460 " EasyMotion -------------------------------------------------------------- {{{
461 map en <Plug>(easymotion-sn)
462 map ej <Plug>(easymotion-j)
463 map ek <Plug>(easymotion-k)
464 map eb <Plug>(easymotion-b)
465 map ew <Plug>(easymotion-w)
466 map ee <Plug>(easymotion-w)
467 map el <Plug>(easymotion-lineforward)
468 map eh <Plug>(easymotion-linebackward)
470 "map <SPACE>n <Plug>(easymotion-sn)
471 "map <SPACE>j <Plug>(easymotion-j)
472 "map <SPACE>k <Plug>(easymotion-k)
473 "map <SPACE>b <Plug>(easymotion-b)
474 "map <SPACE>w <Plug>(easymotion-w)
475 "map <SPACE>e <Plug>(easymotion-w)
476 "map <SPACE>l <Plug>(easymotion-lineforward)
477 "map <SPACE>h <Plug>(easymotion-linebackward)
480 " vim-latex --------------------------------------------------------------- {{{
481 "set grepprg=grep\ -nH\ $*
482 "let g:tex_flavor='latex'
484 "autocmd BufEnter *.tex set sw=2
485 "disable default mapping
486 imap #$ <Plug>IMAP_JumpForward
487 nmap #$ <Plug>IMAP_JumpForward
488 vmap #$ <Plug>IMAP_JumpForward
489 vmap #$ <Plug>IMAP_DeleteAndJumpForward
490 let g:Imap_FreezeImap=1
493 " FileType ---------------------------------------------------------------- {{{
494 autocmd BufNewFile,BufRead *.log set filetype=logecc
495 autocmd BufNewFile,BufRead *.log.[0-9] set filetype=logecc
496 autocmd BufNewFile,BufRead *tmux.conf set filetype=tmux
497 autocmd BufNewFile,BufRead SConstruct set filetype=python
498 autocmd BufNewFile,BufRead SConscript* set filetype=python
499 autocmd BufNewFile,BufReadPost *.md set filetype=markdown
500 autocmd BufNewFile,BufRead *.c set filetype=cpp
502 " http://vim.wikia.com/wiki/Update_the_diff_view_automatically
503 autocmd InsertLeave,BufWritePost,CursorHold * if &diff == 1 | diffupdate | endif
504 " setlocal nomodifiable for svn diff
505 autocmd BufWinEnter *.svn-base setlocal nomodifiable
507 autocmd WinEnter * nnoremap <buffer> gj @=(&diff)?']czz':'gj'<CR> |
508 \ nnoremap <buffer> gk @=(&diff)?'[czz':'gk'<CR>
510 autocmd FileType qf nnoremap <buffer> <silent> q :q<CR> | setlocal nowrap | setlocal nocursorline
511 autocmd FileType help nnoremap <buffer> <silent> q :q<CR> | vertical resize 85;
512 autocmd FileType c,cpp setlocal foldmethod=syntax |
513 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
514 \ inoremap <buffer> { {<CR>}<ESC>kA<CR>|
515 \ nnoremap <buffer> <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zzzr:wincmd w<cr>
516 autocmd FileType python setlocal foldmethod=indent |
519 autocmd FileType xml setlocal foldmethod=syntax |
520 \ let g:xml_syntax_folding=1
521 autocmd FileType vim setlocal foldmethod=marker |
522 \ setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
523 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("", "{} \"")
525 autocmd FileType perl setlocal foldmethod=syntax |
526 \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") |
527 \ inoremap <buffer> {<CR> {<CR>}<ESC>kA<CR>
529 autocmd Filetype markdown setlocal textwidth=80
531 autocmd CmdwinEnter * map <buffer> q :q<CR>
534 " Functions --------------------------------------------------------------- {{{
535 " DiffOrig ---------------------------------------------------------------- {{{
536 " refert vimrc_example.vim
537 " Convenient command to see the difference between the current buffer and the
538 " file it was loaded from, thus the changes you made.
539 " Only define it when not defined already.
540 if !exists(":DiffOrig")
541 command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
542 \ | wincmd p | diffthis
545 " Fold Quickfix ----------------------------------------------------------- {{{
546 "http://vim.wikia.com/wiki/Show_only_lines_in_quickfix_list_for_current_buffer
547 if ! exists('g:foldmisses_context')
548 let g:foldmisses_context = 0
551 " Add manual fold from line1 to line2, inclusive.
552 function! s:Fold(line1, line2)
554 execute a:line1.','.a:line2.'fold'
558 " Return list of line numbers for current buffer found in quickfix list.
559 function! s:GetHitLineNumbers(list)
562 if d.valid && d.bufnr == bufnr('')
563 call add(result, d.lnum)
569 function! s:FoldMisses(list, context)
570 setlocal foldmethod=manual
572 let extra = a:context == 99999 ? g:foldmisses_context : a:context
574 for lnum in s:GetHitLineNumbers(a:list)
575 " let start = last==0 ? 1 : last+extra
576 let start = last==0 ? 1 : last+1+extra
577 call s:Fold(start, lnum-1-extra)
580 call s:Fold(last+1+extra, line('$'))
581 " call s:Fold(last+extra, line('$'))
584 ":[N]FoldMisses [N] Show only the lines (and surrounding [N] lines
585 ":[N]FoldLMisses [N] of context) in the current buffer that appear
586 " in the quickfix / location list.
587 " Missed, error-free lines are folded away.
588 command! -bar -count=99999 FoldMisses call s:FoldMisses(getqflist(), <count>)
589 command! -bar -count=99999 FoldLMisses call s:FoldMisses(getloclist(0), <count>)
591 " ToggleList -------------------------------------------------------------- {{{
592 "http://vim.wikia.com/wiki/Toggle_to_open_or_close_the_quickfix_window
593 function! GetBufferList()
600 function! ToggleList(bufname, pfx)
601 let buflist = GetBufferList()
602 for bufnum in map(filter(split(buflist, '\n'), 'v:val =~ "'.a:bufname.'"'), 'str2nr(matchstr(v:val, "\\d\\+"))')
603 if bufwinnr(bufnum) != -1
608 if a:pfx == 'l' && len(getloclist(0)) == 0
610 echo "Location List is Empty."
620 nmap <silent> \l :call ToggleList("Location List", 'l')<CR>
621 nmap <silent> \q :call ToggleList("Quickfix List", 'c')<CR>
623 " DiffToggle -------------------------------------------------------------- {{{
624 "if !exists(":DiffToggle")
627 function! DiffToggle()
629 diffoff | wincmd l | :q
631 exec ":VCSVimDiff" | wincmd h
634 nnoremap \d :call DiffToggle()<CR>
635 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
640 "nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
641 nnoremap <silent> <cr> @=(foldlevel('.')?'za':"\<Space>")<CR>
642 "noremap <Leader>d @=(&diff)?':diffoff':":VCSVimDiff"<CR><CR>
644 " https://bitbucket.org/sjl/dotfiles/src/tip/vim/vimrc
645 " Make sure Vim returns to the same line when you reopen a file.
650 \ if line("'\"") > 0 && line("'\"") <= line("$") |
651 \ execute 'normal! g`"zvzz' |
655 iabbrev -... <C-R>=repeat('-', 80 - col(".") - 4 ) . " {{{"
659 " to show the key sequence when pressing some key,
665 " some prefix for mapping
672 nnoremap <C-N> :cn<CR>zzzv
673 nnoremap <C-P> :cp<CR>zzzv
674 "http://dougblack.io/words/a-good-vimrc.html
677 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:vsp<CR>:wincmd w<cr>:exec("tag ". word)<cr>
678 "nnoremap <silent> <C-]> :let word=expand("<cword>")<CR>:wincmd o<cr>:vsp<CR>:exec("tag ". word)<cr>zz:wincmd w<cr>
679 " command in normal mode, and visual mode
682 " gn select search and in visual mode
683 " confirm when using :q to quit the last tab page,
684 "Alias q if\ winnr('$')>1||tabpagenr('$')>1||confirm('Really\ quit?',\ "&OK\\n&Cancel")==1|quit|endif
688 " color of current line
690 nnoremap <Leader>m :marks abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<CR>:normal '
692 "let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript',
693 " \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir']