_vimrc (1360B)
1 set fileencodings=utf-8 2 set tabstop=4 3 set shiftwidth=4 4 autocmd BufRead *.c,*.h,*.cpp,*.hpp set cindent 5 "autocmd BufRead *.c,*.h,*.cpp set foldmethod=syntax 6 "au BufWinLeave *.c,*.h,*.cpp mkview 7 "au BufWinEnter *.c,*.h,*.cpp silent loadview 8 autocmd BufReadPre *.md set fileencodings=utf-8 9 "autocmd BufReadPre *.txt,*.koi8 set fileencodings=koi8-r 10 "autocmd BufReadPre 0readme.txt set fileencodings=utf-8 11 autocmd BufEnter ?akefile* set include=^s\=include 12 autocmd BufLeave ?akefile* set include& 13 autocmd BufRead *.py set smartindent expandtab 14 autocmd BufRead *.cmd set syntax=tcsh 15 autocmd BufRead *.db set syntax=tcsh tabstop=2 shiftwidth=2 smartindent expandtab 16 17 if has("cscope") 18 au QuickfixCmdPost make cs reset 19 endif 20 21 if exists("*matchadd") 22 " highlight trailing spaces 23 au BufNewFile,BufRead * let b:mtrailingws=matchadd('ErrorMsg', '\S\zs\s\+$', -1) 24 " empty line 25 "au BufNewFile,BufRead * let b:mtrailingws=matchadd('ErrorMsg', '^\s\+$', -1) 26 " highlight tabs between spaces 27 "au BufNewFile,BufRead * let b:mtabbeforesp=matchadd('ErrorMsg', '\v(\t+)\ze( +)', -1) 28 au BufNewFile,BufRead * let b:mtabaftersp=matchadd('ErrorMsg', '\v( +)\zs(\t+)', -1) 29 30 " disable matches in help buffers 31 au BufEnter,FileType help call clearmatches() 32 endif 33 " vim: set expandtab smartindent tabstop=2 shiftwidth=2: 34