您的位置:首页 > 其它

vim进阶-自己设置vim编辑器

2017-03-31 14:09 190 查看

我这是最基础的一些vim设置,参考文章http://blog.csdn.net/huiguixian/article/details/6394095

看大牛设置的vim,感觉很花里胡哨,以后慢慢接触:http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html

系统vim设置:/etc/vim/vimrc

个人vim设置:~/.vimrc    ,没有可以自己建一个

配置如下:

"syntax high light
syntax on
"show the line number
set nu
"let the tabstop equal 4
set tabstop=4
"set the autoindent on
set autoindent
"set the match time is one tenth second
set matchtime=1
"high light the search
set hlsearch
"set the c language indent format
set cindent
"set the indent width
set shiftwidth=4
"set show status on
set ruler
"set show mode on
set showmode

 统计vim中查找字符串的数量

比如我有一个log文件,我文件里符合规则的字符是yes,我想查找这个abc.log文件中的yes字符数量,怎么查找呢,如下:

:%s/yes//gn

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: