我的 .vimrc 配置

1. 支持中文编辑,不会导致删除半个字符和光标移动半个中文字符的问题

2.支持C/C++的自动缩进

3.解决在自动缩进状态下,用鼠标粘贴时引起的格式错乱

" author:zhouhh
" blog:http://blog.csdn.net/ablo_zhou
" email:[email protected]
" date: 2008.4.1

setnocompatible
" UseVimdefaults(muchbetter!)
setbs=indent,eol,start
" Allowbackspacingovereverythingininsertmode
setai
" Alwayssetauto-indentingon
setcindent
" forceditor
setpaste
" forpastemayformattextdisorder

" setbackup " Keepabackupfile
setviminfo='20,
" 500 " read/writea.viminfofile--limitregsto500lines
sethistory=100
" keep 50 linesofcommandhistory
setruler
" Showthecursorpositionallthetime

" colorschemeelflord " Makethecolorsbrighterfortransparentterminals
setts=4
" SetTABStop
setshiftwidth
= 4 " Setshiftwidthinprogrammingwhenusing>>
settextwidth=0
" Don'twrapwordsbydefault
setignorecase
" Ignorecaseinsearching
setsmartcase
" Searchcase-sensitivelywhencapitalizedletterfoundinpattern
setnobackup
" Don'tkeepabackupfile
setshowcmd
" Show(partial)commandinstatusline
setshowmatch
" Showmatchingbrackets
setincsearch
" IncrementalSearch
" setautowrite " Automaticallysavefilebefore:nextand:prev
" setnowrap " Donotwraptext
" settextwidth=80 " Placeautomatictextbreaks

" EnableChineseencodingsupport
setencoding=euc-cn
ifv:lang=~
" ^zh_CN "
setfileencodings=gb2312
setguifontset=*-r-*
" Youmaychangethefonttoyourlike
endif

" Switchsyntaxhighlightingon,whentheterminalhascolors
" Alsoswitchonhighlightingthelastusedsearchpattern.
if&t_Co>
2 ||has( " gui_running " )
syntaxon
sethlsearch
endif

" setnohlsearch " Ifyoudonotlikehighlightingsearchpattern
~

你可能感兴趣的:(C++,c,C#,Blog,Gmail)