首页 » 系统管理 » 正文

Mac VI着色

1,编辑文件/usr/share/vim/vimrc

sudo vi /usr/share/vim/vimrc

2,在set backspace=2下面一行插入如下代码

set ai                  " auto indenting
set ruler               " show the cursor position
set hlsearch            " highlight the last searched term
set history=1000        " keep 1000 lines of history
syntax on               " syntax highlighting
filetype plugin on      " use the file type plugins

3,保存退出,查看效果

4,如果想一直显示行号,可以再添加如下代码,同vi/vim用法

set nu