1 set nocompatible
  2 source $VIMRUNTIME/vimrc_example.vim
  3 source $VIMRUNTIME/mswin.vim
  4 behave mswin
  5
  6 set diffexpr=MyDiff()
  7 function MyDiff()
  8   let opt = '-a --binary '
  9   if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
 10   if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
 11   let arg1 = v:fname_in
 12   if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
 13   let arg2 = v:fname_new
 14   if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
 15   let arg3 = v:fname_out
 16   if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
 17   let eq = ''
 18   if $VIMRUNTIME =~ ' '
 19     if &sh =~ '\<cmd'
 20       let cmd = '""' . $VIMRUNTIME . '\diff"'
 21       let eq = '"'
 22     else
 23       let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
 24     endif
 25   else
 26     let cmd = $VIMRUNTIME . '\diff'
 27   endif
 28   silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
 29 endfunction
 30
 31 """""""""""""""""""""""""""""""""""""""""""""""""""""""
 32 "
 33 "
 34 "   add by riwpu [2011-09-21]
 35 "
 36 "
 37 """""""""""""""""""""""""""""""""""""""""""""""""""""""
 38 " An example for a vimrc file.
 39 "
 40 " Maintainer:   Bram Moolenaar <Bram@vim.org>
 41 " Last change:  2008 Dec 17
 42 "
 43 " To use it, copy it to
 44 "     for Unix and OS/2:  ~/.vimrc
 45 "         for Amiga:  s:.vimrc
 46 "  for MS-DOS and Win32:  $VIM\_vimrc
 47 "       for OpenVMS:  sys$login:.vimrc
 48
 49 " When started as "evim", evim.vim will already have done these settings.
 50 if v:progname =~? "evim"
 51   finish
 52 endif
 53
 54 " Use Vim settings, rather than Vi settings (much better!).
 55 " This must be first, because it changes other options as a side effect.
 56 set nocompatible
 57
 58 " allow backspacing over everything in insert mode
 59 set backspace=indent,eol,start
 60
 61 """"""""""""""""""""""""""""""""
 62 " del by ripwu
 63 """"""""""""""""""""""""""""""""
 64 "if has("vms")
 65   "set nobackup     " do not keep a backup file, use versions instead
 66 "else
 67   "set backup       " keep a backup file
 68 "endif
 69
 70 set history=4096 " keep 4096 lines of command line history
 71 set ruler        " show the cursor position all the time
 72 set showcmd      " display incomplete commands
 73 set incsearch    " do incremental searching
 74
 75 " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
 76 " let &guioptions=substitute(&guioptions, "t", "", "g")
 77
 78 " Don't use Ex mode, use Q for formatting
 79 map Q gq
 80
 81 " CTRL-U in insert mode deletes a lot.  Use CTRL-G u to first break undo,
 82 " so that you can undo CTRL-U after inserting a line break.
 83 inoremap <C-U> <C-G>u<C-U>
 84
 85 " In many terminal emulators the mouse works just fine, thus enable it.
 86 if has('mouse')
 87   set mouse=a
 88 endif
 89
 90 " Switch syntax highlighting on, when the terminal has colors
 91 " Also switch on highlighting the last used search pattern.
 92 if &t_Co > 2 || has("gui_running")
 93   syntax on
 94   set hlsearch
 95 endif
 96
 97 " Only do this part when compiled with support for autocommands.
 98 if has("autocmd")
 99
100   " Enable file type detection.
101   " Use the default filetype settings, so that mail gets 'tw' set to 72,
102   " 'cindent' is on in C files, etc.
103   " Also load indent files, to automatically do language-dependent indenting.
104   filetype plugin indent on
105
106   " Put these in an autocmd group, so that we can delete them easily.
107   augroup vimrcEx
108   au!
109
110   " For all text files set 'textwidth' to 78 characters.
111   autocmd FileType text setlocal textwidth=78
112
113   autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab
114   autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
115
116   " Customisations based on house-style (arbitrary)
117   autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab
118   autocmd FileType css setlocal ts=2 sts=2 sw=2 expandtab
119   autocmd FileType javascript setlocal ts=4 sts=4 sw=4 noexpandtab
120
121   " Treat .rss files as XML
122   autocmd BufNewFile,BufRead *.rss setfiletype xml
123
124   " When editing a file, always jump to the last known cursor position.
125   " Don't do it when the position is invalid or when inside an event handler
126   " (happens when dropping a file on gvim).
127   " Also don't do it when the mark is in the first line, that is the default
128   " position when opening a file.
129   autocmd BufReadPost *
130     \ if line("'\"") > 1 && line("'\"") <= line("$") |
131     \   exe "normal! g`\"" |
132     \ endif
133
134   augroup END
135
136 else
137
138   set autoindent        " always set autoindenting on
139
140 endif " has("autocmd")
141
142 " Convenient command to see the difference between the current buffer and the
143 " file it was loaded from, thus the changes you made.
144 " Only define it when not defined already.
145 if !exists(":DiffOrig")
146   command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
147           \ | wincmd p | diffthis
148 endif
149
150 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
151 ""                                                hacked by ripwu from 2010/7/19                                              ''
152 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
153
154 set nu
155 syntax enable
156 syntax on
157 set nocp         " non vi compatible mode
158 set autoindent
159 set smartindent
160 set shiftwidth=4
161 set incsearch    " incremental search
162 set nobackup     " no *~ backup files
163 set copyindent   " copy the previous indentation on autoindenting
164 set ignorecase   " ignore case when searching
165 set smartcase    " ignore case if search pattern is all lowercase, case-sensitive otherwise
166 set showmatch    " highlight matched (
167 set noerrorbells " close error bell
168 set novisualbell
169 set t_vb=        " close visual bell
170 filetype plugin on
171 filetype plugin indent on
172
173 au GUIEnter * simalt ~x " maximze gvim windows
174
175 " :helptags ~/.vim/doc/ " update help docs
176 " :help event
177
178 """"""""""""""""""""""""""""""
179 "" tab setting
180 """"""""""""""""""""""""""""""
181 set tabstop=4    " set tab length=4space
182 set expandtab    " replace <Tab> with spaces, if want to insert a real tab, use Ctrl-V<Tab>
183 set smarttab     " insert tabs on the start of a line according to context
184 set softtabstop=4
185 set shiftwidth=4
186
187 au FileType Makefile set noexpandtab
188
189 """"""""""""""""""""""""""""""
190 "" session
191 """"""""""""""""""""""""""""""
192 " :mks!
193 " vim -S Session.vim
194
195 """"""""""""""""""""""""""""""
196 "" colorscheme
197 """"""""""""""""""""""""""""""
198 " :runtime syntax/colortest.vim      " To make life easier when selecting colors
199 "
200 " I really love my own color scheme
201 " enable terminal 256 num colors
202 set t_Co=256
203 "if has("win32")
204 if has("gui_running")
205     colorscheme desertEx
206 else
207     " colorscheme rip
208     colorscheme desertExCTerm
209 endif
210
211 """"""""""""""""""""""""""""""
212 "" Show syntax highlighting groups of the word under cursor with <C-S-P>
213 """"""""""""""""""""""""""""""
214 " remember to install this script with :so %
215 nmap <C-S-P> :call <SID>SynStack()<CR>
216 function! <SID>SynStack()
217    if !exists("*synstack")
218       return
219    endif
220    echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
221 endfunc
222
223 """"""""""""""""""""""""""""""
224 "" fonts setting
225 """"""""""""""""""""""""""""""
226 if has("win32")
227     " English
228     "set guifont=Arial_monospaced_for_SAP:h9:cANSI
229     set guifont=Courier_New:h9:cANSI
230     " Chinese belongs to wide font
231     set guifontwide=幼圆:h10:cGB2312
232 endif
233
234 """"""""""""""""""""""""""""""
235 "" gui setting
236 """"""""""""""""""""""""""""""
237 if has("gui_running")
238     " set guioptions-=m  " remove menu bar
239     set guioptions-=T  " remove toolbar
240     set guioptions-=r  " remove right-hand scroll bar
241     set guioptions-=l  " remove left-hand scroll bar
242     set guioptions-=L  " remove left-hand scroll bar even if there is a vertical split
243     set guioptions-=b  " remove bottom scroll bar
244 endif
245
246 """"""""""""""""""""""""""""""
247 "" encoding settings
248 """"""""""""""""""""""""""""""
249 set encoding=utf-8
250 set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,gbk,euc-jp,euc-kr,latin1
251 if has("win32")
252     set fileencoding=chinese
253     " fix menu gibberish
254     source $VIMRUNTIME/delmenu.vim
255     source $VIMRUNTIME/menu.vim
256     " fix console gibberish
257     language messages zh_CN.utf-8
258 else
259     set termencoding=utf-8
260     set fileencoding=utf-8
261 endif
262
263 """"""""""""""""""""""""""""""
264 " FencView.vim
265 """"""""""""""""""""""""""""""
266 " :FencAutoDetect " auto detect file encoding
267 " :FencView       " choose file encodings
268 let g:fencview_autodetect=1   " auto detect file encoding when I open file
269 let g:fencview_checklines=200 " check encoding by first N lines
270
271 """"""""""""""""""""""""""""""
272 "" tags
273 """"""""""""""""""""""""""""""
274 if has("win32")
275     set tags+=E:\workspace\linux\tags  " tags for /usr/include/ (copy /usr/include/ to E:\workspace\linux\usr\include\ then build the tags :-)
276 else
277     set tags+=~/.vim/tags/include/tags " tags for /usr/include/
278 endif
279 set tags+=tags                         " tags for current project
280
281 " :[count]tn[ext]                  " jump to [count] next matching tag (default 1)
282 " :[count]tp[revious]              " jump to [count] previous matching tag (default 1)
283 " :ts[elect][ident]                " list the tags that match [ident]
284 " :sts[elect][ident]               " does :tselect[!] [ident] and splits the window for the selected tag
285
286 " <C-]>       " go to definition
287 " <C-T>       " Jump back from the definition.
288 " <C-W><C-]>  " Open the definition in a horizontal split
289
290 " Open the definition in a new tab
291 map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
292 " Open the definition in a vertical split
293 map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
294
295 """"""""""""""""""""""""""""""
296 "" Tag list (ctags)
297 """"""""""""""""""""""""""""""
298 "map <C-l> :Tlist<CR>
299 if has("win32")
300     let Tlist_Ctags_Cmd='ctags'             " set ctags path
301 else
302     let Tlist_Ctags_Cmd='~/ctags-5.8/ctags' " set ctags path
303 endif
304 let Tlist_Show_One_File=1               " only show current file's taglist
305 let Tlist_Exit_OnlyWindow=1             " if taglist is of the last windows, exit vim
306 let Tlist_Use_Right_Window=1            " show taglist at right
307 let Tlist_File_Fold_Auto_Close=1        " hide taglist if it's not for current file
308
309 """"""""""""""""""""""""""""""
310 "" Supertab.vim
311 """"""""""""""""""""""""""""""
312 let g:SuperTabRetainCOmpletionType=2    " 2: remember last autocomplete type, unless I use ESC to exit insert mode
313 let g:SuperTabDefaultCompletionType="<C-X><C-O>"
314
315 """"""""""""""""""""""""""""""
316 "" Omnicppcomplete
317 """"""""""""""""""""""""""""""
318 " :help omnicppcomplete
319 set completeopt=longest,menu      " I really HATE the preview window!!!
320 let OmniCpp_NameSpaceSearch=1     " 0: namespaces disabled
321                                   " 1: search namespaces in the current buffer [default]
322                                   " 2: search namespaces in the current buffer and in included files
323 let OmniCpp_GlobalScopeSearch=1   " 0: disabled 1:enabled
324 let OmniCpp_ShowAccess=1          " 1: show access
325 let OmniCpp_ShowPrototypeInAbbr=1 " 1: display prototype in abbreviation
326 let OmniCpp_MayCompleteArrow=1    " autocomplete after ->
327 let OmniCpp_MayCompleteDot=1      " autocomplete after .
328 let OmniCpp_MayCompleteScope=1    " autocomplete after ::
329 let OmniCpp_DefaultNamespaces=["std", "GLIBCXX_STD"]
330
331 autocmd FileType python set omnifunc=pythoncomplete#Complete
332 autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
333 autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
334 autocmd FileType css set omnifunc=csscomplete#CompleteCSS
335 autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
336 autocmd FileType php set omnifunc=phpcomplete#CompletePHP
337 autocmd FileType c set omnifunc=ccomplete#Complete
338
339 """"""""""""""""""""""""""""""
340 "" BufExplorer
341 """"""""""""""""""""""""""""""
342 let g:bufExplorerDefaultHelp=0       " Do not show default help.
343 let g:bufExplorerShowRelativePath=1  " Show relative paths.
344 let g:bufExplorerSortBy='mru'        " Sort by most recently used.
345 let g:bufExplorerSplitRight=0        " Split left.
346 let g:bufExplorerSplitVertical=1     " Split vertically.
347 let g:bufExplorerSplitVertSize=30    " Split width
348 let g:bufExplorerUseCurrentWindow=1  " Open in new window.
349 autocmd BufWinEnter \[Buf\ List\] setl nonumber
350
351 """"""""""""""""""""""""""""""
352 "" winManager setting
353 """"""""""""""""""""""""""""""
354 "let g:winManagerWindowLayout="BufExplorer,FileExplorer|TagList"
355 let g:winManagerWindowLayout="FileExplorer|TagList"
356 let g:winManagerWidth=30
357 let g:defaultExplorer=0
358 nmap <silent> <leader>fir :FirstExplorerWindow<CR>
359 nmap <silent> <leader>bot :BottomExplorerWindow<CR>
360 nmap <F8> :WMToggle<CR>
361
362 """"""""""""""""""""""""""""""
363 "" NERDTree setting (not used cause vim-nerdtree-tabs.vim is more powerful)
364 """"""""""""""""""""""""""""""
365 " let NERDTreeWinPos="left" " where NERD tree window is placed on the screen
366 " let NERDTreeWinSize=28    " size of the NERD tree
367 " nmap <F6> <ESC>:NERDTreeToggle<CR>
368
369 " set guitablabel=%t
370
371 " " :help event
372 " autocmd VimEnter * NERDTree
373 " autocmd BufEnter * NERDTreeMirror
374
375 """"""""""""""""""""""""""""""
376 "" vim-nerdtree-tabs.vim
377 """"""""""""""""""""""""""""""
378 map <F6> <plug>NERDTreeTabsToggle<CR>
379
380 let g:nerdtree_tabs_open_on_gui_startup=1     " Open NERDTree on gvim/macvim startup
381 let g:nerdtree_tabs_open_on_console_startup=1 " Open NERDTree on console vim startup
382 let g:nerdtree_tabs_open_on_new_tab=1         " Open NERDTree on new tab creation
383 let g:nerdtree_tabs_meaningful_tab_names=1    " Unfocus NERDTree when leaving a tab for descriptive tab names
384 let g:nerdtree_tabs_autoclose=1               " Close current tab if there is only one window in it and it's NERDTree
385 let g:nerdtree_tabs_synchronize_view=1        " Synchronize view of all NERDTree windows (scroll and cursor position)
386
387 " When switching into a tab, make sure that focus is on the file window, not in the NERDTree window.
388 let g:nerdtree_tabs_focus_on_files=1
389
390 " t  " Opens the selected file in a new tab.
391 " T  " The same as |NERDTree-t| except that the focus is kept in the current tab.
392 " i  " Opens the selected file in a new split window and puts the cursor in the new window.
393 " gi " The same as |NERDTree-i| except that the cursor is not moved.  |NERDTree-i|).
394 " s  " Opens the selected file in a new vertically split window and puts the cursor in the new window.
395 " gs " The same as |NERDTree-s| except that the cursor is not moved.
396 " x  " Closes the parent of the selected node.
397 " X  " Recursively closes all children of the selected directory.
398 " o  " Open a file or a directory.
399 " O  " Recursively opens the selelected directory.
400
401 """"""""""""""""""""""""""""""
402 "" DoxygenToolkit.vim
403 """"""""""""""""""""""""""""""
404 " :Dox       " generate function comment
405 " :DoxLic    " generate lincese
406 " :DoxAuthor " generate author info
407 let g:DoxygenToolkit_authorName="ripwu@tencent.com"
408 let g:DoxygenToolkit_licenseTag="My own license\<enter>"
409 let g:DoxygenToolkit_undocTag="DOXIGEN_SKIP_BLOCK"
410 let g:DoxygenToolkit_briefTag_pre="@brief\t"
411 let g:DoxygenToolkit_paramTag_pre="@param\t"
412 let g:DoxygenToolkit_returnTag="@return\t"
413 let g:DoxygenToolkit_briefTag_funcName="no"
414 let g:DoxygenToolkit_maxFunctionProtoLines=30
415
416 """"""""""""""""""""""""""""""
417 "" vimwiki
418 """"""""""""""""""""""""""""""
419 " \ww open wiki index at new window
420 " \wt open wiki index at new tab
421 " \w\w open/create today's item
422 " \w\t open/create today's item at new tab
423 " \ws
424 " \wd delete current item
425 " \wr rename current item
426 map <F3> :Vimwiki2HTML<cr>
427 map <S-F3> :VimwikiAll2HTML
428 "let g:vimwiki_list=[{'html_header' : '~/vimwiki_html/header.tpl'}]
429
430 """"""""""""""""""""""""""""""
431 "" show invisible character
432 """"""""""""""""""""""""""""""
433 " :set list!    " show invisible character
434 " :set invlist
435 "set listchars=
436 " invisible character colors
437 highlight NonText guifg=#4a4a59
438 highlight SpecialKey guifg=#4a4a59
439
440 """"""""""""""""""""""""""""""
441 "" edit command
442 """"""""""""""""""""""""""""""
443 let mapleader=','
444 cnoremap %% <C-R>=expand('%:h').'/'<cr>
445 map <leader>ew :e %%
446 map <leader>es :sp %%
447 map <leader>ev :vsp %%
448 map <leader>et :tabe %%
449
450 """"""""""""""""""""""""""""""
451 " F1: vim help
452 " F2: not used by now
453 " F3: VimWiki2Html
454 " F4: tag list
455 " F5: builg tags
456 " F6: NERDTree
457 " F7: generate comments by doxygen
458 " F8: winManager
459 " F9: replace all spaces at the end of line
460 " <C-F>: search word under cursor like source insight
461 " F10: next matched line
462 " F11: previous matched line (Quick Fix)
463 " F12: show calander
464 """"""""""""""""""""""""""""""
465 " build tags of my own project width F5
466 " --c++-kinds=+p : generate extra function prototypes info
467 " {
468 "              c : classes
469 "              d : macro definitions
470 "              e : enumerators(values inside an enumeration)
471 "              f : function definitions
472 "              g : enumeration names
473 "              l : local variables [off]
474 "              m : class, struct, and union members
475 "              n : namespaces
476 "              p : function prototypes [off]
477 "              s : structure names
478 "              t : typedefs
479 "              u : union names
480 "              v : variable definitions
481 "              x : external variable declarations [off]
482 " }
483 " --fileds=+iaS  : generate inheritabce/access/function Signature
484 " {
485 "              i : inheritance information
486 "              a : acess(or export) of class members
487 "              S : signature of routine (e.g. prototpye or parameter list)
488 " }
489 " --extra=+q     : generate class name info for class members
490 if has("win32")
491     " firstly, copy a win version of ctags to $PATH, then enjoy using it
492     map <F5> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
493 else
494     map <F5> :!~/ctags-5.8/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
495 endif
496
497 set grepprg=grep
498 " :make
499 " :grep [pattern] [file]
500 " example: :grep -rn epoll **/*.[hc] **/*.cpp
501
502 " replace all spaces at the end of line
503 nmap <F9> :s=\s\+$==<CR>
504
505 " search word under cursor like source insight
506 " <cword> is replaced with the word under the cursor (like |star|) (:help cmdline or :help cword)
507 map <C-F> :execute "let g:word=expand(\"<cword>\")"<Bar>execute "vimgrep /\\<" . g:word ."\\>/g **/*.[ch] **/*.cpp"<Bar>execute "cc 1"<Bar>execute "cw"<CR>
508 " next matched line
509 map <silent> <F10> :cnext<CR>
510 " previous matched line
511 map <silent> <F11> :cprevious<CR>
512 " open QuickFix
513 " :copen
514 " close QuickFix
515 " :cclose
516
517 " calander
518 map <F12> :Calendar<cr>
519
520 """"""""""""""""""""""""""""""
521 "" tagbar setting
522 """"""""""""""""""""""""""""""
523 nmap <silent> <F4> :TagbarToggle<CR>
524 let g:tagbar_ctags_bin='ctags'
525 let g:tagbar_width=30
526
527 """"""""""""""""""""""""""""""
528 "" move around tabs
529 """"""""""""""""""""""""""""""
530 " :gt  " go to prev tab
531 " :gT  " go to next tab
532 map <C-t><C-t> :tabnew<CR>
533 map <C-t><C-c> :tabclose<CR>
534 map <C-t><C-e> :tabedit
535
536 nmap <A-1> 1gt
537 nmap <A-2> 2gt
538 nmap <A-3> 3gt
539 nmap <A-4> 4gt
540 nmap <A-5> 5gt
541 nmap <A-6> 6gt
542 nmap <A-7> 7gt
543 nmap <A-8> 8gt
544 nmap <A-9> 9gt
545
546 imap <A-1> 1gt
547 imap <A-2> 2gt
548 imap <A-3> 3gt
549 imap <A-4> 4gt
550 imap <A-5> 5gt
551 imap <A-6> 6gt
552 imap <A-7> 7gt
553 imap <A-8> 8gt
554 imap <A-9> 9gt
555
556 vmap <A-1> 1gt
557 vmap <A-2> 2gt
558 vmap <A-3> 3gt
559 vmap <A-4> 4gt
560 vmap <A-5> 5gt
561 vmap <A-6> 6gt
562 vmap <A-7> 7gt
563 vmap <A-8> 8gt
564 vmap <A-9> 9gt
565
566 """"""""""""""""""""""""""""""
567 "" misc.
568 """"""""""""""""""""""""""""""
569 " select all text
570 map <C-a> ggVG
571
572 nmap t V>
573 nmap T V<
574 vmap t >gv
575 vmap T <gv
576
577 map <C-h> <C-w>h
578 map <C-j> <C-w>j
579 map <C-k> <C-w>k
580 map <C-l> <C-w>l
581
582 """"""""""""""""""""""""""""""
583 "" folden  settings
584 """"""""""""""""""""""""""""""
585 set foldenable           " enable folden
586 set foldmethod=syntax    " manual : Folds are created manually.
587                          " indent : Lines with equal indent form a fold.
588                          " expr   : 'foldexpr' gives the fold level of a line.
589                          " marker : Markers are used to specify folds.
590                          " syntax : Syntax highlighting items specify folds.
591                          " diff   : Fold text that is not changed.
592 set foldcolumn=3         " set folden column width
593 "setlocal foldlevel=100
594 set foldlevel=100        " 100: means don't autofold anything (but I can still fold manually)
595 set foldopen-=search     " dont open folds when I search into thm
596 set foldopen-=undo       " dont open folds when I undo stuff
597
598 "set foldclose=all
599 " use space to folden
600 nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
601
602 """"""""""""""""""""""""""""""
603 "" highlight 80/81th char
604 """"""""""""""""""""""""""""""
605 "au BufRead,BufNewFile *.c,*.cpp,*.py match Error /\%80v.\%81v./
606

*Author: *Last Update: 2012-05-13 *View: 5240