环境ubuntu12.04
sudo vi /etc/vim/vimrc
1、显示行号
在文件末端添加一新行,输入 set nu
2、语法高亮
在文件中找到 "syntax on 这一行,去掉前面的双引号",双引号是注释的意思
3、自动缩进
在文件末尾添加
set autoindent set cindent set shiftwidth=4 set tabstop=4
其中 autoindent 是自动缩进; cindent是特别针对 C语言语法自动缩进
环境ubuntu12.04
sudo vi /etc/vim/vimrc
1、显示行号
在文件末端添加一新行,输入 set nu
2、语法高亮
在文件中找到 "syntax on 这一行,去掉前面的双引号",双引号是注释的意思
3、自动缩进
在文件末尾添加
set autoindent set cindent set shiftwidth=4 set tabstop=4
其中 autoindent 是自动缩进; cindent是特别针对 C语言语法自动缩进
转载于:https://www.cnblogs.com/qkcan/archive/2012/08/06/2624535.html