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
42 cmap <S-Insert> <C-R>*
43 else "for bash vim setting
48 "let $VIMFILY='~/.vim'
49 let $VIMFILY=expand("$HOME") . '/.vim'
51 "source ~/vimfiles/filetype.vim
52 else "for win32 setting
54 "source $VIMRUNTIME/mswin.vim
55 "set guioptions+=a "auto copy to
57 set grepprg=grep\ -n\ $*\ /dev/null
58 set grepformat=%f:%l:%m,%f:%l%m,%f\ %l%m
59 cabbrev sort /bin/sort
63 let $VIMFILY=expand("$HOME") . '/vimfiles'
66 let $ADDED=$VIMFILY . '/added_plugin'
68 source $ADDED/my_vimrc_example.vim
69 if !has("unix") && has("gui_running")
70 source $ADDED/my_mswin.vim
73 source $ADDED/publib.vim
76 let $ADDED2=$VIM . '/vimfiles/added_plugin2'
81 """"""""""""""""""""""""""""""""""""""""""""""""""""""
83 """""""""""""""""""""""""""""""""""""""""""""""""""""
85 set hh=999 "set the help windows defaul height to max
86 set linebreak "let english word break whole word
90 set viminfo='100,<1500,s500,:500,/300
94 set hid "let you can change buffer without save
96 "turn off ignorecase in a typed search if an uppercase char exists.
98 call CodeMode() "most time are coding:)
102 set guioptions-=T "hide the toolbar
103 set guioptions-=m "hide the menubar
104 "set guioptions+=c "use text dialog
108 "set rulerformat=%50(\ %n[%{&ff}]%r%m%y%=%-14.(%l,%c%V%)\ %p%%%)
109 "set statusline=%<%f %n[%{&ff}]%r%m%y%=%-14.(%l,%c%V%)\ %p%%
110 hi User1 term=standout,bold cterm=reverse ctermbg=red gui=bold guifg=red guibg=Grey
111 hi User2 term=standout,bold cterm=reverse gui=bold guibg=Grey
114 """""""""""""""""""""""""""""""""""""""""""""""""""""""
115 "function for return the file format and file encoding
116 "from http://msghost.iyublog.com/?cat=477
117 function! FunFileEncoding()
118 return &ff . ":" . &fenc
120 """"""""""""""""""""""""""""""""""""""""""""""""""
122 set statusline=%2*%=\ \ \ %50(%f\ @%n[%{FunFileEncoding()}]%r%m%y#%{changenr()}%=\ \ \ %-14.(%l,%c\(%v\)%)\ %p%%%)%*
125 set listchars+=tab:>-
126 set wildmenu "ÓÃtabÔÚÃüÁîÐÐÌáʾ
127 "set clipboard+=unnamed "ÊÇy ºÍ p ͬϵͳ¼ôÇаåÏàÁ¬
128 set clipboard+=autoselect
129 "set splitbelow "splitting a window below the current one
130 """""""""""""""""""""""""""""""""""""""""""""""""""""
132 """""""""""""""""""""""""""""""""""""""""""""""""""""
135 set backupdir=/var/backups/vi
137 if($MYGENV == "true")
138 set backupdir=$E_DISK/var/backups/vi
140 set backupdir=e:/var/backups/vi
144 "set sessionoptions+=curdir
146 set backupskip+=*.clean,cvscommit.????,*.~
147 set wildignore=*.o,*.obj,*.exe,*.bak,*.clean
148 if has("gui_running")
149 let savevers_dirs = &backupdir
151 source $ADDED/savevers.vim
156 "change the direct when chang the buffer
157 "au BufEnter * :lcd %:p:h
161 set titlestring=%<%F\ %M\ %R\ %{v:servername}\ %{mode()}\ e\ U
163 """""""""""""""""""""""""""""""""""""""""""""""""""""
166 """"""""""""""""""""""""""""""""""""""""""""""""""""""
167 """""""""""""""""""""""""""""""""""""""""""""""""""""
168 " Text Formatting/Layout
169 """""""""""""""""""""""""""""""""""""""""""""""""""""
171 """""""""""""""""""""""""""""""""""""""""""""""""""""
173 """""""""""""""""""""""""""""""""""""""""""""""""""""
174 set foldenable " Turn on folding
175 "set foldmethod=indent " Make folding indent sensitive
176 set foldlevel=100 " Don't autofold anything (but I can still fold manually)
177 "set foldopen-=search " don't open folds when you search into them
180 "set foldmethod=syntax
181 let g:xml_syntax_folding = 1
182 let xml_use_xhtml = 1
187 """""""""""""""""""""""""""""""""""""""""""""""""""""
189 """""""""""""""""""""""""""""""""""""""""""""""""""""
191 "nnoremap <C-i> i <esc>r
199 "for del the auto comment
200 noremap <m-cr> o<esc>^"8d$a
202 "for eclipse compatible
203 inoremap <m-/> <c-x><c-o>
205 "for good insert next line
207 noremap <m-i> :let g:currentline=line('.')<cr>:.d<cr>:if g:currentline==line('.')<cr>:normal -<cr>:endif<cr>o
209 "use <c-v> to mapping the block visual mode do not using the win32 paste
212 "nnoremap <silent> <cr> i<cr><esc>
216 "notice, <c-e> using for end complete mode, <c-y> using for accept complete in
221 inoremap <C-u> <esc>g-a
222 inoremap <C-r> <esc>g+a
223 "inoremap <C-u> <C-O>u
224 "inoremap <C-r> <C-O><C-R>
228 " my complete setting
229 " failure try, must find a way to map /
230 "inoremap / <kDivide>
231 "imap <expr> <F3> "\u611B"
232 "inoremap <Right> <C-R>=pumvisible() ? "\<lt>C-N>" : "\<lt>Down>"<CR>
234 "like in emacs to kill a line
235 inoremap <C-k> <space><esc>d$a
237 "for del the auto comment
238 inoremap <m-cr> <cr><esc>^d$a
240 " reproduce previous line word by word
241 "inoremap <C-j> @@@<ESC>hhkyWjl?@@@<CR>P/@@@<CR>3s
244 " Put string marked by visual mode as default for search commands / and ?
245 " Warning: extending the marked text by searching doesn't work any more.
246 "vnoremap / y/<C-R>=escape(substitute(@","\n.*",'',''),'/\?*.$^~][')<cr>
247 "vnoremap ? y?<C-R>=escape(substitute(@","\n.*",'',''),'/\?*.$^~][')<cr>
249 " substitute(@",..) - remove lines after first, if >1 line highlighted
250 " escape(..) - put '\' before all characters meaningful in regexp's
251 " y - yank current selection (in register ")
252 " ctrl-r = .. <cr> - put expression after / as earch string
253 " credits go to Stefan Roemer and Peppe (Preben Guldberg).
255 " Remove whitespace from lines containing nothing else (grr to all nedit users)
257 "for the mouse conflict key(c-insert) of HP notebook
258 noremap <Insert> <Esc>
259 noremap <C-Insert> <Esc>
260 inoremap <Insert> <Down>
261 inoremap <C-Insert> <Down>
265 "for new tab page setting
266 map <leader>ta <esc>:tab sball<cr>
269 map <leader>bp <esc>:bp<return>
270 map <leader>bn <esc>:bn<return>
271 map <leader>bl <esc>:ls!<cr>
273 nnoremap <leader>dd <esc>:call MyTriggerMore()<cr>
274 map <leader>yy <esc>^"*y$
276 "editor setting mapping
277 map <leader>ec <esc>:call MyCoding()<cr>
278 map <leader>el <esc>:set list!<cr>
279 map <leader>em <esc>:call MyMenu()<cr>
280 map <leader>en <esc>:set nu!<cr>:set cursorline!<cr>
281 map <leader>ew <esc>:call MyWrap()<cr>
283 "file or browser mapping
284 map <leader>fx <esc>:Ex<cr>
285 nnoremap <leader>fd :set fileformat=dos<cr>
286 nnoremap <leader>fu :set fileformat=unix<cr>
287 map <leader>ww <esc>:call MyUrl(expand('<cWORD>'))<cr>
288 map <leader>m <esc>:silent MarksBrowser<cr>
291 map <leader>sh <esc>:set hlsearch!<cr>
292 map <leader>sn <esc>:%s//&/gn<cr>
295 map <leader>ss <esc>:setlocal spell!<cr>
297 "ca xsp write !aspell -a --lang="en_US"<cr>
298 "map <leader>s <Esc>:w<cr><Esc>:!aspell -c --dont-backup --lang=en_US "%:p"<cr>:e! "%"<cr><cr>
300 "map <leader>df <esc>:silent !start firefox "http://www.m-w.com/cgi-bin/Dictionary?book=Dictionary&va=<cword>"<cr><cr>
301 "map <leader>dF <esc>:silent !start firefox "http://www.m-w.com/cgi-bin/Thesaurus?book=Thesaurus&va=<cword>"<cr><cr>
302 "map <leader>dW <esc>:silent !wnb <cword> <cr><cr>
304 "for new tab setting and new align setting
305 " leader mode mapping
306 map <leader>la <esc>:call SecondLoadAlign()<cr>
307 map <leader>lt <esc>:call SecondTriggerChangeTab()<cr>
309 " remove space and enter charactor
310 map <leader>rs <esc>::%s= *$==<cr>
311 map <leader>rd <esc>:%s/\r//g<cr>
314 "MAKE IT EASY TO UPDATE/RELOAD_vimrc
315 nnoremap <leader>-s <esc>:source ~/_vimrc<cr>
316 nnoremap <leader>-v <esc>:e ~/_vimrc<cr>
318 """""""""""""""""""""""""""""""""""""""""""""""""""""
319 " <F5>-<F8>maping for savers-pluging
320 " <F5> decrease version viewed in VersDiff window
321 " <F6> increase version viewed in VersDiff window
322 " <F7> do VersDiff with cvs version of current file
323 " <F8> cancel VersDiff window
324 nmap <silent> <F3> :VersDiff -<cr>
325 nmap <silent> <F4> :VersDiff +<cr>
326 """""""""""""""""""""""""""""""""""""""""""""""""""""
328 " for autohotkey to using:)
329 " 0=english input 1=chinese input
334 com! MM call MyMore()
335 """""""""""""""""""""""""""""""""""""""""""""""""""""
337 """""""""""""""""""""""""""""""""""""""""""""""""""""
338 "Programmings abbrevs
339 """""""""""""""""""""""""""""""""""""""""""""""""""""
340 """""""""""""""""""""""""""""""""""""""""""""""""""""
341 "Informational abbrevs
342 """""""""""""""""""""""""""""""""""""""""""""""""""""
343 "iab xda <c-r>=strftime("%Y-%m-%d-%H:%M:%S")<cr>
344 iab xda <c-r>=substitute(system("date +%Y-%m-%d-%H:%M"),"\n","","")<cr>
348 iabbrev synchronisation
358 """""""""""""""""""""""""""""""""""""""""""""""""""""
361 """""""""""""""""""""""""""""""""""""""""""""""""""""
362 "for no swap attation
366 if v:statusmsg =~ '\.sw[^p]$'
367 set statusline=%2*%=\ \ \ %50(%f\ @%n%*%1*[$]%*%2*[%{&ff}]%r%m%y%=\ \ \ %-14.(%l,%c\(%v\)%)\ %p%%%)%*
370 set statusline=%2*%=\ \ \ %50(%f\ @%n[%{FunFileEncoding()}]%r%m%y#%{changenr()}%=\ \ \ %-14.(%l,%c\(%v\)%)\ %p%%%)%*
371 "set statusline=%2*%=\ \ \ %50(%f\ @%n[%{&ff}]%r%m%y%=\ \ \ %-14.(%l,%c%V%)\ %p%%%)%*
377 autocmd BufEnter * silent call CheckSwap()
379 """""""""""""""""""""""""""""""""""""""""""""""""""""
384 """""""""""""""""""""""""""""""""""""""""""""""""""""
386 """""""""""""""""""""""""""""""""""""""""""""""""""""
387 "let g:vikiUseParentSuffix = 1
388 "let g:vikiSpecialFiles='jpg\|gif\|bmp\|pdf\|dvi\|ps\|eps\|png\|jpeg\|wmf\|otl'
389 "let g:vikiOpenFileWith_otl = 'silent !D:/prog/Natara/Bonsai/Bonsai.exe %{FILE}'
391 " we want to allow deplate to execute ruby code and external helper
393 "let g:deplatePrg = "deplate -x -X "
394 "au FileType viki compiler deplate
395 "let g:vikiInterOLM= $HOME ."/olm"
396 "let g:vikiInterOLM_suffix= ".olm"
397 "let g:vikiInterHW= $HOME ."/viki"
398 "let g:vikiInterHW_suffix= ".txt"
403 """""""""""""""""""""""""""""""""""""""""""""""""""""
405 map <leader>rr :MRU<cr>gg
406 let MRU_Max_Entries = 500
407 let MRU_Exclude_Files = '^/tmp/.*\|^/var/tmp/.*|^c:\\temp\\.*'
408 let MRU_File = $VIMFILY . "/_vim_mru_files"
409 "let MRU_Auto_Close = 0 " to keep the mru window
410 """""""""""""""""""""""""""""""""""""""""""""""""""""
412 """""""""""""""""""""""""""""""""""""""""""""""""""""
413 " setting for subversion
414 nmap <leader>va <Plug>VCSAdd
415 nmap <leader>vn <Plug>VCSAnnotate
416 nmap <leader>vc <Plug>VCSCommit
417 nmap <leader>vd <Plug>VCSDiff
418 nmap <leader>ve <Plug>VCSEdit
419 nmap <leader>vi <Plug>VCSEditors
420 nmap <leader>vg <Plug>VCSGotoOriginal
421 nmap <leader>vG <Plug>VCSGotoOriginal!
422 nmap <leader>vl <Plug>VCSLog
423 nmap <leader>vr <Plug>VCSReview
424 nmap <leader>vs <Plug>VCSStatus
425 nmap <leader>vt <Plug>VCSUnedit
426 nmap <leader>vu <Plug>VCSUpdate
427 nmap <leader>vv <Plug>VCSVimDiff
428 nmap <leader>vwv <Plug>VCSWatchers
429 nmap <leader>vwa <Plug>VCSWatchAdd
430 nmap <leader>vwn <Plug>VCSWatchOn
431 nmap <leader>vwf <Plug>VCSWatchOff
432 nmap <leader>vwf <Plug>VCSWatchRemove
433 """""""""""""""""""""""""""""""""""""""""""""""""""""
436 """""""""""""""""""""""""""""""""""""""""""""""""""""
438 """""""""""""""""""""""""""""""""""""""""""""""""""""
439 "autocmd BufEnter * :syntax sync fromstart " ensure every file does syntax highlighting (full)
440 "autocmd BufEnter * :lcd %:p:h " switch to current dir
441 "autocmd GUIEnter * :simalt ~x " maximize the screen
443 augroup filetypedetect
444 """""""""""""""""""""""""""""""""""""""""""""""""""""
445 "for help and readbale file mode
446 augroup! filetypedetect
447 autocmd FileType help call MyMore()
448 """""""""""""""""""""""""""""""""""""""""""""""""""""
450 """""""""""""""""""""""""""""""""""""""""""""""""""""
451 "for the make error windows quickfix windows
452 au BufReadPost quickfix set modifiable
453 au BufReadPost quickfix silent g/^/s//\=line(".")." "/
454 autocmd FileType qf call MyMore()
455 """""""""""""""""""""""""""""""""""""""""""""""""""""
457 """""""""""""""""""""""""""""""""""""""""""""""""""""
459 """""""""""""""""""""""""""""""""""""""""""""""""""""
460 "autocmd BufNewFile *.sh 0r ~/vimtemplate/skeleton.sh
461 "autocmd BufNewFile *.vim 0r $HOME/vimfiles/skel/vim.skel
462 autocmd BufNewFile,BufReadPre *.java,*.vim,*.sh,*.html,*.xhtml,*.py source $ADDED/skel.vim
463 "autocmd BufNewFile *.java 0r $VIMFILY/skel/java.skel
464 "autocmd BufNewFile *.vim 0r $VIMFILY/skel/vim.skel
465 "autocmd BufNewFile *.sh 0r $VIMFILY/skel/sh.skel
466 "autocmd BufNewFile *.html 0r $VIMFILY/skel/html.skel
467 "autocmd BufNewFile *.xhtml 0r $VIMFILY/skel/xhtml.skel
468 "autocmd BufNewFile *.java,*.vim,*.sh,*.html,*.xhtml call Replacy()
469 """""""""""""""""""""""""""""""""""""""""""""""""""""
470 """""""""""""""""""""""""""""""""""""""""""""""""""""
472 "au BufReadPre *.doc set ro
473 "au BufReadPre *.doc set hlsearch!
474 "au BufReadPost *.doc silent %!antiword "%"
475 "autocmd BufReadPost *.doc silent %!wvware "%"
476 """""""""""""""""""""""""""""""""""""""""""""""""""""
477 "au BufNewFile,BufRead /home/Administrator/std-java/new1.5/* let g:bnojikes=1
479 autocmd BufWritePre,FileWritePre *.vim ks|call LastMod()|'s
480 autocmd BufWritePre,FileWritePre *.jsp,*.html ks|call LastMod2()|'s
482 autocmd BufNewFile,BufreadPre *.text,*.wiki call TextMode()
483 "autocmd BufNewFile,BufreadPre *.rst call RstMode()
484 autocmd FileType vim setlocal complete=.,k~/dic/vimdiction,w,b,u,i
486 autocmd fileType ahk source $ADDED/bracket.vim
489 """""""""""""""""""""""""""""""""""""""""""""""""""""
491 """""""""""""""""""""""""""""""""""""""""""""""""""""
492 nnoremap <silent> <F8> :Tlist<cr>
493 let Tlist_Sort_Type = "name" " order by
494 let Tlist_Use_Right_Window = 1 " split to the right side of the screen
495 let tlist_dosini_settings= 'ini;r:respect'
496 let tlist_html_settings = 'html;a:anchor;f:javascript function;u:url'
497 let tlist_vb_settings= 'vb;t:type;s:sub;f:function'
498 let tlist_ant_settings = 'ant;p:Project;r:Property;t:Target'
499 let JavaBrowser_Use_SingleClick = 0
500 let JavaBrowser_Use_Right_Window = 1
501 let JavaBrowser_Use_Icon = 0
502 let JavaBrowser_Compact_Format = 1
503 let JavaBrowser_Expand_Tree_At_Startup = 1
506 """""""""""""""""""""""""""""""""""""""""""""""""""""
508 """""""""""""""""""""""""""""""""""""""""""""""""""""
509 let g:JavaImpPaths = $JAVALIB."/j2sdk1.5_src,".$JAVALIB."junit_src,".$VIMFILY."/JavaImp/jmplst"
510 let g:JavaImpDataDir = $VIMFILY."/JavaImp"
511 let g:JavaImpDocPaths= $JAVA_DOCPATH
512 let g:JavaImpDocViewer = "viewHtml"
516 """""""""""""""""""""""""""""""""""""""""""""""""""""
518 """""""""""""""""""""""""""""""""""""""""""""""""""""
519 let g:favex_ff='<leader>fa'
520 let g:favex_fd='<leader>fA'
521 """""""""""""""""""""""""""""""""""""""""""""""""""""
523 """""""""""""""""""""""""""""""""""""""""""""""""""""
524 """""""""""""""""""""""""""""""""""""""""""""""""""""
527 au VCSCommand User VCSBufferCreated silent! nmap <unique> <buffer> q :bwipeout<cr>
529 "let g:VCSCommandEdit= 'spilt'
531 """""""""""""""""""""""""""""""""""""""""""""""""""""
533 """""""""""""""""""""""""""""""""""""""""""""""""""""
535 """""""""""""""""""""""""""""""""""""""""""""""""""""
536 "let g:bufExplorerDetailedHelp=1
537 let g:netrw_keepdir=0
538 let g:netrw_cygwin= 1
539 let g:netrw_longlist=1
540 let g:netrw_sort_by="time"
541 let g:netrw_sort_direction="reverse"
542 let g:netrw_timefmt=" %Y %m %d\t%H:%M"
543 let g:netrw_winsize=25
545 """""""""""""""""""""""""""""""""""""""""""""""""""""
547 """""""""""""""""""""""""""""""""""""""""""""""""""""
548 "nmap <silent> <unique> <leader>be <Plug>SelectBuf
549 "nmap <unique> <leader>bl <Plug>SelBufLaunchCmd
550 "let selBufAlwaysShowHidden=0
551 "let selBufIgnoreNonFileBufs=0
554 "nmap <Leader>tv :call TabLineSet_verbose_toggle()<CR>
555 "nmap <Leader>tr :call TabLineSet_verbose_rotate()<CR>
556 "nmap <silent> <Leader>w :call WinWalkerMenu()<CR>
562 "Highlight space at end of line as error
563 "highlight WhitespaceEOL ctermbg=darkred guibg=darkred
564 "match WhitespaceEOL /\s\+$/
570 "set diffexpr=MyDiff()
572 " let opt = '-a --binary '
573 " if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
574 " if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
575 " let arg1 = v:fname_in
576 " if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
577 " let arg2 = v:fname_new
578 " if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
579 " let arg3 = v:fname_out
580 " if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
581 " silent execute '!e:\prog\Vim\vim63\diff ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
585 function! MyTabLabel(n)
586 let buflist = tabpagebuflist(a:n)
587 let winnr = tabpagewinnr(a:n)
588 return bufname(buflist[winnr - 1])
591 function! MyTabLine()
593 for i in range(tabpagenr('$'))
594 " select the highlighting
595 if i + 1 == tabpagenr()
596 let s .= '%#TabLineSel#'
598 let s .= '%#TabLine#'
601 " set the tab page number (for mouse clicks)
602 let s .= '%' . (i + 1) . 'T'
604 " the label is made by MyTabLabel()
605 let s .= ' %{MyTabLabel(' . (i + 1) . ')} '
608 " after the last tab fill with TabLineFill and reset tab page nr
609 let s .= '%#TabLineFill#%T'
611 " right-align the label to close the current tab page
612 if tabpagenr('$') > 1
613 let s .= '%=%#TabLine#%999Xclose'
619 function! GuiTabLabel()
621 "let bufnrlist = tabpagebuflist(v:lnum)
623 " Add '+' if one of the buffers in the tab page is modified
624 "for bufnr in bufnrlist
625 "if getbufvar(bufnr, "&modified")
631 " Append the number of windows in the tab page if more than one
632 "let wincount = tabpagewinnr(v:lnum, '$')
634 "let label .= wincount
636 if v:lnum == g:currentPage
641 " Append the buffer name
644 function! GuiTabLabel2()
646 let bufnrlist = tabpagebuflist(v:lnum)
648 " Add '+' if one of the buffers in the tab page is modified
649 "for bufnr in bufnrlist
650 "if getbufvar(bufnr, "&modified")
656 " Append the number of windows in the tab page if more than one
657 if v:lnum == g:currentPage
660 let wincount = tabpagewinnr(v:lnum, '$')
662 let label .= wincount
668 function! GuiTabLabelEnter()
669 let g:currentPage=tabpagenr()
670 set guitablabel=%{GuiTabLabel()}%N\ %t\ %{GuiTabLabel2()}
673 function! GuiTabLabelLeave()
676 " the tab setting and mapping
678 "set guitablabel=%N\ %f
679 "set guitablabel=%{GuiTabLabel()}
681 "set guitablabel=%N/\ %t\ %M
682 set tabline=%!MyTabLine()
684 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>
685 map <silent><C-tab> :if g:toggleTabs == 1<CR>:tabnext<CR>:else<CR>:bn<CR>:endif<CR>
686 map <silent><C-S-tab> :if g:toggleTabs == 1<CR>:tabprevious<CR>:else<CR>:bp<CR>:endif<CR>
688 map <leader>tt <esc>:tabnew<cr>:let g:toggleTabs=1<cr>
689 map <leader>tx :tabclose<cr>:if tabpagenr("$") == 1<cr>let g:toggleTabs=0<cr>:endif<cr><cr>
690 map <leader>tm :tabmove
691 map <leader>tn :tabnext <cr>
692 map <leader>tp :tabprevious <cr>
693 "map <C-Tab> :tabn <CR>
694 "map <C-S-Tab> :tabp <CR>
697 autocmd TabEnter * call GuiTabLabelEnter()
701 if has("gui_running")
702 function! InfoGuiTooltip()
704 let wincount = tabpagewinnr(tabpagenr(),'$')
706 "get name of active buffers in windows
707 for i in tabpagebuflist()
708 let bufferlist .= '['.fnamemodify(bufname(i),':t')."]"
710 return bufname($).'-'.bufferlist
712 set guitabtooltip=%!InfoGuiTooltip()
715 function! FoldSpellBalloon()
716 let foldStart = foldclosed(v:beval_lnum )
717 let foldEnd = foldclosedend(v:beval_lnum)
719 " Detect if we are in a fold
721 " Detect if we are on a misspelled word
722 let lines = spellsuggest( spellbadword(v:beval_text)[ 0 ], 5, 0 )
725 let numLines = foldEnd - foldStart + 1
726 " if we have too many lines in fold, show only the first 14
727 " and the last 14 lines
729 let lines = getline( foldStart, foldStart + 14 )
730 let lines += [ '-- Snipped ' . ( numLines - 30 ) . ' lines --' ]
731 let lines += getline( foldEnd - 14, foldEnd )
733 "less than 30 lines, lets show all of them
734 let lines = getline( foldStart, foldEnd )
738 return join( lines, has( "balloon_multiline" ) ? "\n" : " " )
740 set balloonexpr=FoldSpellBalloon()
747 let g:vimim_chinese_punctuation=0
750 let jslint_highlight_color = 'yellow'
755 set csprg=/usr/bin/mlcscope
757 set csprg=d:\\cygwin\\bin\\mlcscope.exe
760 " for clipbord conflict with NERD
761 nmap <unique> <silent> <Leader>co <Plug>ClipBrdOpen
763 " add my highlight setting
764 highlight CursorLine term=none cterm=none