5 "set nocompatible "because this is defined in vimrc_example.vim
7 source $VIMRUNTIME/vimrc_example.vim
8 set fileformats=unix,dos
9 set fencs=ucs-bom,utf-8,gb2312,gbk,gb18030,latin1
10 "set fencs=ucs-bom,chinese,taiwan,japan,korea,utf-8,latin1
14 if has("gui_running") "for gdk+ vim seting
18 "source $VIMRUNTIME/delmenu.vim
19 "source $VIMRUNTIME/menu.vim
20 "set imactivatekey=C-space
23 "inoremap <esc> <esc>:set iminsert=2<cr>
24 "noremap i :set iminsert=2<cr>i
25 "noremap a :set iminsert=2<cr>a
29 " CTRL-A is Select all
30 noremap <C-A> gggH<C-O>G
31 inoremap <C-A> <C-O>gg<C-O>gH<C-O>G
32 cnoremap <C-A> <C-C>gggH<C-O>G
33 onoremap <C-A> <C-C>gggH<C-O>G
34 snoremap <C-A> <C-C>gggH<C-O>G
35 xnoremap <C-A> <C-C>ggVG
37 " CTRL-V and SHIFT-Insert are Paste
\r
42 cmap <S-Insert> <C-R>*
45 else "for bash vim setting
51 "source ~/vimfiles/filetype.vim
52 else "for win32 setting
54 source $VIMRUNTIME/mswin.vim
55 "set guioptions+=a "auto copy to
58 set grepprg=grep\ -n\ $*\ /dev/null
59 set grepformat=%f:%l:%m,%f:%l%m,%f\ %l%m
60 cabbrev sort /bin/sort
64 let $VIMFILY='~/vimfiles'
67 let $ADDED=$VIMFILY . '/added_plugin'
68 source $ADDED/publib.vim
73 """"""""""""""""""""""""""""""""""""""""""""""""""""""
75 """""""""""""""""""""""""""""""""""""""""""""""""""""
77 set hh=999 "set the help windows defaul height to max
78 set linebreak "let english word break whole word
82 set viminfo='100,<1500,s500,:500,/300
86 set hid "let you can change buffer without save
88 "turn off ignorecase in a typed search if an uppercase char exists.
90 call CodeMode() "most time are coding:)
94 set guioptions-=T "hide the toolbar
95 set guioptions-=m "hide the menubar
96 "set guioptions+=c "use text dialog
100 "set rulerformat=%50(\ %n[%{&ff}]%r%m%y%=%-14.(%l,%c%V%)\ %p%%%)
101 "set statusline=%<%f %n[%{&ff}]%r%m%y%=%-14.(%l,%c%V%)\ %p%%
102 hi User1 term=standout,bold cterm=reverse ctermbg=red gui=bold guifg=red guibg=Grey
103 hi User2 term=standout,bold cterm=reverse gui=bold guibg=Grey
106 """""""""""""""""""""""""""""""""""""""""""""""""""""""
107 "function for return the file format and file encoding
108 "from http://msghost.iyublog.com/?cat=477
109 function! FunFileEncoding()
110 return &ff . ":" . &fenc
112 """"""""""""""""""""""""""""""""""""""""""""""""""
114 set statusline=%2*%=\ \ \ %50(%f\ @%n[%{FunFileEncoding()}]%r%m%y%=\ \ \ %-14.(%l,%c%V%)\ %p%%%)%*
117 set listchars+=tab:>-
118 set wildmenu "ÓÃtabÔÚÃüÁîÐÐÌáʾ
119 "set clipboard+=unnamed "ÊÇy ºÍ p ͬϵͳ¼ôÇаåÏàÁ¬
120 set clipboard+=autoselect
121 "set splitbelow "splitting a window below the current one
122 """""""""""""""""""""""""""""""""""""""""""""""""""""
124 """""""""""""""""""""""""""""""""""""""""""""""""""""
127 set backupdir=/var/backup/vi
129 set backupdir=e:/var/backup/vi
131 "set sessionoptions+=curdir
133 set backupskip+=*.clean,cvscommit.????,*.~
134 set wildignore=*.o,*.obj,*.exe,*.bak,*.clean
135 if has("gui_running")
136 let savevers_dirs = &backupdir
138 source $ADDED/savevers.vim
143 "change the direct when chang the buffer
144 au BufEnter * :lcd %:p:h
148 set titlestring=%<%F\ %M\ %R\ %{v:servername}\ %{mode()}\ e\ U
150 """""""""""""""""""""""""""""""""""""""""""""""""""""
153 """"""""""""""""""""""""""""""""""""""""""""""""""""""
154 """""""""""""""""""""""""""""""""""""""""""""""""""""
155 " Text Formatting/Layout
156 """""""""""""""""""""""""""""""""""""""""""""""""""""
158 """""""""""""""""""""""""""""""""""""""""""""""""""""
160 """""""""""""""""""""""""""""""""""""""""""""""""""""
161 set foldenable " Turn on folding
162 "set foldmethod=indent " Make folding indent sensitive
163 set foldlevel=100 " Don't autofold anything (but I can still fold manually)
164 "set foldopen-=search " don't open folds when you search into them
167 "set foldmethod=syntax
168 let g:xml_syntax_folding = 1
169 let xml_use_xhtml = 1
174 """""""""""""""""""""""""""""""""""""""""""""""""""""
176 """""""""""""""""""""""""""""""""""""""""""""""""""""
178 "nnoremap <C-i> i <esc>r
186 "for del the auto comment
187 noremap <m-cr> o<esc>^"8d$a
189 "for good insert next line
191 noremap <m-i> :let g:currentline=line('.')<cr>:.d<cr>:if g:currentline==line('.')<cr>:normal -<cr>:endif<cr>o
193 "use <c-v> to mapping the block visual mode do not using the win32 paste
196 "nnoremap <silent> <cr> i<cr><esc>
200 "use <C-t> old using is to shift right and now chang to <C-e>
201 inoremap <C-t> <space><esc>d$a
202 "use <C-e> old using is to inster the character which is below the cursor
204 inoremap <m-cr> <cr><esc>^d$a
206 " reproduce previous line word by word
207 inoremap <C-j> @@@<ESC>hhkyWjl?@@@<CR>P/@@@<CR>3s
210 " Put string marked by visual mode as default for search commands / and ?
211 " Warning: extending the marked text by searching doesn't work any more.
212 vnoremap / y/<C-R>=escape(substitute(@","\n.*",'',''),'/\?*.$^~][')<cr>
213 vnoremap ? y?<C-R>=escape(substitute(@","\n.*",'',''),'/\?*.$^~][')<cr>
215 " substitute(@",..) - remove lines after first, if >1 line highlighted
216 " escape(..) - put '\' before all characters meaningful in regexp's
217 " y - yank current selection (in register ")
218 " ctrl-r = .. <cr> - put expression after / as earch string
219 " credits go to Stefan Roemer and Peppe (Preben Guldberg).
221 " Remove whitespace from lines containing nothing else (grr to all nedit users)
230 "map <leader>s <Esc>:w<cr><Esc>:!aspell -c --dont-backup --lang=en_US "%:p"<cr>:e! "%"<cr><cr>
231 map <leader>ls <esc>:ls!<cr>
232 map <leader>ew <esc>:call MyWrap()<cr>
233 map <leader>ex <esc>:Ex<cr>
234 map <leader>eb <esc>:set encoding=big5<cr>
235 map <leader>ec <esc>:call MyCoding()<cr>
236 map <leader>eu <esc>:set encoding=utf-8<cr>
237 map <leader>el <esc>:set list!<cr>
238 map <leader>es <esc>:set hlsearch!<cr>
239 map <leader>em <esc>:call MyMenu()<cr>
240 map <leader>en <esc>:set nu!<cr>:set cursorline!<cr>
241 map <leader>df <esc>:silent !start firefox "http://www.m-w.com/cgi-bin/Dictionary?book=Dictionary&va=<cword>"<cr><cr>
242 map <leader>dF <esc>:silent !start firefox "http://www.m-w.com/cgi-bin/Thesaurus?book=Thesaurus&va=<cword>"<cr><cr>
243 map <leader>dW <esc>:silent !wnb <cword> <cr><cr>
244 "map <leader>dz <esc>:!start firefox.exe <cWORD><cr><cr>
245 map <leader>dz <esc>:call MyUrl(expand('<cWORD>'))<cr>
246 map <leader>dw <esc>:call MyWebs(expand('<cword>'))<cr>1<cr>-
247 nnoremap <leader>dd <esc>:call MyTriggerMore()<cr>
248 nnoremap <leader>fd :set fileformat=dos<cr>
249 nnoremap <leader>fu :set fileformat=unix<cr>
250 map <leader>bp <esc>:bp<return>
251 map <leader>bn <esc>:bn<return>
252 map <leader>yy <esc>^"*y$
254 "MAKE IT EASY TO UPDATE/RELOAD_vimrc
255 nnoremap <leader>-s <esc>:source ~/_vimrc<cr>
256 nnoremap <leader>-v <esc>:e ~/_vimrc<cr>
258 """""""""""""""""""""""""""""""""""""""""""""""""""""
259 " <F5>-<F8>maping for savers-pluging
260 " <F5> decrease version viewed in VersDiff window
261 " <F6> increase version viewed in VersDiff window
262 " <F7> do VersDiff with cvs version of current file
263 " <F8> cancel VersDiff window
264 nmap <silent> <F3> :VersDiff -<cr>
265 nmap <silent> <F4> :VersDiff +<cr>
266 """""""""""""""""""""""""""""""""""""""""""""""""""""
268 " for autohotkey to using:)
269 " 0=english input 1=chinese input
274 com! MM call MyMore()
275 """""""""""""""""""""""""""""""""""""""""""""""""""""
277 """""""""""""""""""""""""""""""""""""""""""""""""""""
278 "Programmings abbrevs
279 """""""""""""""""""""""""""""""""""""""""""""""""""""
280 """""""""""""""""""""""""""""""""""""""""""""""""""""
281 "Informational abbrevs
282 """""""""""""""""""""""""""""""""""""""""""""""""""""
283 "iab xda <c-r>=strftime("%Y-%m-%d-%H:%M:%S")<cr>
284 iab xda <c-r>=substitute(system("date +%Y-%m-%d-%H:%M"),"\n","","")<cr>
288 iabbrev synchronisation
298 """""""""""""""""""""""""""""""""""""""""""""""""""""
301 """""""""""""""""""""""""""""""""""""""""""""""""""""
302 "for no swap attation
306 if v:statusmsg =~ '\.sw[^p]$'
307 set statusline=%2*%=\ \ \ %50(%f\ @%n%*%1*[$]%*%2*[%{&ff}]%r%m%y%=\ \ \ %-14.(%l,%c%V%)\ %p%%%)%*
310 set statusline=%2*%=\ \ \ %50(%f\ @%n[%{FunFileEncoding()}]%r%m%y%=\ \ \ %-14.(%l,%c%V%)\ %p%%%)%*
311 "set statusline=%2*%=\ \ \ %50(%f\ @%n[%{&ff}]%r%m%y%=\ \ \ %-14.(%l,%c%V%)\ %p%%%)%*
317 autocmd BufEnter * silent call CheckSwap()
319 """""""""""""""""""""""""""""""""""""""""""""""""""""
324 """""""""""""""""""""""""""""""""""""""""""""""""""""
326 """""""""""""""""""""""""""""""""""""""""""""""""""""
327 "let g:vikiUseParentSuffix = 1
328 "let g:vikiSpecialFiles='jpg\|gif\|bmp\|pdf\|dvi\|ps\|eps\|png\|jpeg\|wmf\|otl'
329 "let g:vikiOpenFileWith_otl = 'silent !D:/prog/Natara/Bonsai/Bonsai.exe %{FILE}'
331 " we want to allow deplate to execute ruby code and external helper
333 "let g:deplatePrg = "deplate -x -X "
334 "au FileType viki compiler deplate
335 "let g:vikiInterOLM= $HOME ."/olm"
336 "let g:vikiInterOLM_suffix= ".olm"
337 "let g:vikiInterHW= $HOME ."/viki"
338 "let g:vikiInterHW_suffix= ".txt"
343 """""""""""""""""""""""""""""""""""""""""""""""""""""
345 map <leader>rr :MRU<cr>gg
346 let MRU_Max_Entries = 20
347 "let MRU_Exclude_Files = '^/tmp/.*\|^/var/tmp/.*|^c:\\temp\\.*'
348 "let MRU_File = '~/_vim_mru_files'
349 "let MRU_Auto_Close = 0 " to keep the mru window
350 """""""""""""""""""""""""""""""""""""""""""""""""""""
352 """""""""""""""""""""""""""""""""""""""""""""""""""""
353 " setting for subversion
354 nmap <leader>va <Plug>VCSAdd
355 nmap <leader>vn <Plug>VCSAnnotate
356 nmap <leader>vc <Plug>VCSCommit
357 nmap <leader>vd <Plug>VCSDiff
358 nmap <leader>ve <Plug>VCSEdit
359 nmap <leader>vi <Plug>VCSEditors
360 nmap <leader>vg <Plug>VCSGotoOriginal
361 nmap <leader>vG <Plug>VCSGotoOriginal!
362 nmap <leader>vl <Plug>VCSLog
363 nmap <leader>vr <Plug>VCSReview
364 nmap <leader>vs <Plug>VCSStatus
365 nmap <leader>vt <Plug>VCSUnedit
366 nmap <leader>vu <Plug>VCSUpdate
367 nmap <leader>vv <Plug>VCSVimDiff
368 nmap <leader>vwv <Plug>VCSWatchers
369 nmap <leader>vwa <Plug>VCSWatchAdd
370 nmap <leader>vwn <Plug>VCSWatchOn
371 nmap <leader>vwf <Plug>VCSWatchOff
372 nmap <leader>vwf <Plug>VCSWatchRemove
373 """""""""""""""""""""""""""""""""""""""""""""""""""""
375 """""""""""""""""""""""""""""""""""""""""""""""""""""
377 if !hasmapto('<Plug>CRV_CRefVimVisual')
378 vmap <silent> <unique> <Leader>Cr <Plug>CRV_CRefVimVisual
379 nmap <silent> <unique> <Leader>Cr <Plug>CRV_CRefVimNormal
380 map <silent> <unique> <Leader>Cw <Plug>CRV_CRefVimAsk
381 map <silent> <unique> <Leader>Cc <Plug>CRV_CRefVimInvoke
383 """""""""""""""""""""""""""""""""""""""""""""""""""""
386 """""""""""""""""""""""""""""""""""""""""""""""""""""
388 "ca xsp write !aspell -a --lang="en_US"<cr>
389 """""""""""""""""""""""""""""""""""""""""""""""""""""
392 """""""""""""""""""""""""""""""""""""""""""""""""""""
394 """""""""""""""""""""""""""""""""""""""""""""""""""""
395 "autocmd BufEnter * :syntax sync fromstart " ensure every file does syntax highlighting (full)
396 "autocmd BufEnter * :lcd %:p:h " switch to current dir
397 "autocmd GUIEnter * :simalt ~x " maximize the screen
399 augroup filetypedetect
400 """""""""""""""""""""""""""""""""""""""""""""""""""""
401 "for help and readbale file mode
402 augroup! filetypedetect
403 autocmd FileType help call MyMore()
404 """""""""""""""""""""""""""""""""""""""""""""""""""""
406 """""""""""""""""""""""""""""""""""""""""""""""""""""
407 "for the make error windows quickfix windows
408 au BufReadPost quickfix set modifiable
409 au BufReadPost quickfix silent g/^/s//\=line(".")." "/
410 autocmd FileType qf call MyMore()
411 """""""""""""""""""""""""""""""""""""""""""""""""""""
413 """""""""""""""""""""""""""""""""""""""""""""""""""""
415 """""""""""""""""""""""""""""""""""""""""""""""""""""
416 "autocmd BufNewFile *.sh 0r ~/vimtemplate/skeleton.sh
417 "autocmd BufNewFile *.vim 0r $HOME/vimfiles/skel/vim.skel
418 autocmd BufNewFile,BufReadPre *.java,*.vim,*.sh,*.html,*.xhtml,*.py source $ADDED/skel.vim
419 "autocmd BufNewFile *.java 0r $VIMFILY/skel/java.skel
420 "autocmd BufNewFile *.vim 0r $VIMFILY/skel/vim.skel
421 "autocmd BufNewFile *.sh 0r $VIMFILY/skel/sh.skel
422 "autocmd BufNewFile *.html 0r $VIMFILY/skel/html.skel
423 "autocmd BufNewFile *.xhtml 0r $VIMFILY/skel/xhtml.skel
424 "autocmd BufNewFile *.java,*.vim,*.sh,*.html,*.xhtml call Replacy()
425 """""""""""""""""""""""""""""""""""""""""""""""""""""
426 """""""""""""""""""""""""""""""""""""""""""""""""""""
428 "au BufReadPre *.doc set ro
429 "au BufReadPre *.doc set hlsearch!
430 "au BufReadPost *.doc silent %!antiword "%"
431 "autocmd BufReadPost *.doc silent %!wvware "%"
432 """""""""""""""""""""""""""""""""""""""""""""""""""""
433 "au BufNewFile,BufRead /home/Administrator/std-java/new1.5/* let g:bnojikes=1
435 autocmd BufWritePre,FileWritePre *.vim ks|call LastMod()|'s
436 autocmd BufWritePre,FileWritePre *.jsp,*.html ks|call LastMod2()|'s
438 autocmd BufNewFile,BufreadPre *.text,*.wiki call TextMode()
439 "autocmd BufNewFile,BufreadPre *.rst call RstMode()
440 autocmd FileType vim setlocal complete=.,k~/dic/vimdiction,w,b,u,i
442 autocmd fileType ahk source $ADDED/bracket.vim
445 """""""""""""""""""""""""""""""""""""""""""""""""""""
447 """""""""""""""""""""""""""""""""""""""""""""""""""""
448 nnoremap <silent> <F8> :Tlist<cr>
449 let Tlist_Sort_Type = "name" " order by
450 let Tlist_Use_Right_Window = 1 " split to the right side of the screen
451 let tlist_dosini_settings= 'ini;r:respect'
452 let tlist_html_settings = 'html;a:anchor;f:javascript function;u:url'
453 let tlist_vb_settings= 'vb;t:type;s:sub;f:function'
454 let tlist_ant_settings = 'ant;p:Project;r:Property;t:Target'
455 let JavaBrowser_Use_SingleClick = 0
456 let JavaBrowser_Use_Right_Window = 1
457 let JavaBrowser_Use_Icon = 0
458 let JavaBrowser_Compact_Format = 1
459 let JavaBrowser_Expand_Tree_At_Startup = 1
462 """""""""""""""""""""""""""""""""""""""""""""""""""""
464 """""""""""""""""""""""""""""""""""""""""""""""""""""
465 let g:JavaImpPaths = $HOME."/j2sdk1.5_src,".$HOME."junit_src,".$VIMFILY."/JavaImp/jmplst"
466 let g:JavaImpDataDir = $VIMFILY."/JavaImp"
468 let g:JavaImpDocPaths = "/media/hda5/jdk-1_5_0-rc-doc/docs/api,/media/hda5/mapinfo/MapXtreme-4.7.1/docs/api,/media/hda5/junit_doc3.8.1"
470 let g:JavaImpDocPaths = "d:/jdk-1_5_0-rc-doc/docs/api,"."d:/prog/mapinfo/MapXtreme-4.7.1/docs/api,"."d:/junit_doc3.8.1"
472 let g:JavaImpDocViewer = "firefox"
476 """""""""""""""""""""""""""""""""""""""""""""""""""""
478 """""""""""""""""""""""""""""""""""""""""""""""""""""
479 let g:favex_ff='<leader>fa'
480 let g:favex_fd='<leader>fA'
481 """""""""""""""""""""""""""""""""""""""""""""""""""""
483 """""""""""""""""""""""""""""""""""""""""""""""""""""
484 """""""""""""""""""""""""""""""""""""""""""""""""""""
487 au VCSCommand User VCSBufferCreated silent! nmap <unique> <buffer> q :bwipeout<cr>
489 "let g:VCSCommandEdit= 'spilt'
491 """""""""""""""""""""""""""""""""""""""""""""""""""""
493 """""""""""""""""""""""""""""""""""""""""""""""""""""
495 """""""""""""""""""""""""""""""""""""""""""""""""""""
496 "let g:bufExplorerDetailedHelp=1
497 let g:netrw_keepdir=0
498 let g:netrw_cygwin= 1
499 let g:netrw_longlist=1
500 let g:netrw_sort_by="time"
501 let g:netrw_sort_direction="reverse"
502 let g:netrw_timefmt=" %Y %m %d\t%H:%M"
503 let g:netrw_winsize=25
505 """""""""""""""""""""""""""""""""""""""""""""""""""""
507 """""""""""""""""""""""""""""""""""""""""""""""""""""
508 "nmap <silent> <unique> <leader>be <Plug>SelectBuf
509 "nmap <unique> <leader>bl <Plug>SelBufLaunchCmd
510 "let selBufAlwaysShowHidden=0
511 "let selBufIgnoreNonFileBufs=0
514 "nmap <Leader>tv :call TabLineSet_verbose_toggle()<CR>
515 "nmap <Leader>tr :call TabLineSet_verbose_rotate()<CR>
516 "nmap <silent> <Leader>w :call WinWalkerMenu()<CR>
522 "Highlight space at end of line as error
523 "highlight WhitespaceEOL ctermbg=darkred guibg=darkred
524 "match WhitespaceEOL /\s\+$/
530 "set diffexpr=MyDiff()
532 " let opt = '-a --binary '
533 " if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
534 " if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
535 " let arg1 = v:fname_in
536 " if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
537 " let arg2 = v:fname_new
538 " if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
539 " let arg3 = v:fname_out
540 " if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
541 " silent execute '!e:\prog\Vim\vim63\diff ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
545 function! MyTabLabel(n)
546 let buflist = tabpagebuflist(a:n)
547 let winnr = tabpagewinnr(a:n)
548 return bufname(buflist[winnr - 1])
551 function! MyTabLine()
553 for i in range(tabpagenr('$'))
554 " select the highlighting
555 if i + 1 == tabpagenr()
556 let s .= '%#TabLineSel#'
558 let s .= '%#TabLine#'
561 " set the tab page number (for mouse clicks)
562 let s .= '%' . (i + 1) . 'T'
564 " the label is made by MyTabLabel()
565 let s .= ' %{MyTabLabel(' . (i + 1) . ')} '
568 " after the last tab fill with TabLineFill and reset tab page nr
569 let s .= '%#TabLineFill#%T'
571 " right-align the label to close the current tab page
572 if tabpagenr('$') > 1
573 let s .= '%=%#TabLine#%999Xclose'
579 function! GuiTabLabel()
581 "let bufnrlist = tabpagebuflist(v:lnum)
583 " Add '+' if one of the buffers in the tab page is modified
584 "for bufnr in bufnrlist
585 "if getbufvar(bufnr, "&modified")
591 " Append the number of windows in the tab page if more than one
592 "let wincount = tabpagewinnr(v:lnum, '$')
594 "let label .= wincount
596 if v:lnum == g:currentPage
601 " Append the buffer name
604 function! GuiTabLabel2()
606 let bufnrlist = tabpagebuflist(v:lnum)
608 " Add '+' if one of the buffers in the tab page is modified
609 "for bufnr in bufnrlist
610 "if getbufvar(bufnr, "&modified")
616 " Append the number of windows in the tab page if more than one
617 if v:lnum == g:currentPage
620 let wincount = tabpagewinnr(v:lnum, '$')
622 let label .= wincount
628 function! GuiTabLabelEnter()
629 let g:currentPage=tabpagenr()
630 set guitablabel=%{GuiTabLabel()}%N\ %t\ %{GuiTabLabel2()}
633 function! GuiTabLabelLeave()
636 " the tab setting and mapping
638 "set guitablabel=%N\ %f
639 "set guitablabel=%{GuiTabLabel()}
641 "set guitablabel=%N/\ %t\ %M
642 set tabline=%!MyTabLine()
644 map <silent><F12> :if g:toggleTabs == 1<CR>:tabo<CR>:set lines+=3<CR>:let g:toggleTabs = 0<CR>:else<CR>:set lines-=3<CR>:tab ball<CR>:let g:toggleTabs = 1<CR>:endif<CR>
645 map <silent><C-tab> :if g:toggleTabs == 1<CR>:tabnext<CR>:else<CR>:bn<CR>:endif<CR>
646 map <silent><C-S-tab> :if g:toggleTabs == 1<CR>:tabprevious<CR>:else<CR>:bp<CR>:endif<CR>
648 map <leader>tt <esc>:tabnew<cr>:let g:toggleTabs=1<cr>
649 map <leader>tx :tabclose<cr>:if tabpagenr("$") == 1<cr>let g:toggleTabs=0<cr>:endif<cr><cr>
650 map <leader>tm :tabmove
651 map <leader>tn :tabnext <cr>
652 map <leader>tp :tabprevious <cr>
653 "map <C-Tab> :tabn <CR>
654 "map <C-S-Tab> :tabp <CR>
657 autocmd TabEnter * call GuiTabLabelEnter()