我的 .vimrc 配置

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

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

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

" author:zhouhh
" blog:http://blog.csdn.net/ablo_zhou
" email:ablozhou@gmail.com
" 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
~
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值