Mac Vim 如何设置高亮

首先进入如下目录
cd /usr/share/vim
然后打开vimrc
sudo vim vimrc

 在vimrc中的“set backspace=2”这行下插入如下代码:

set ai                  " auto indenting
set history=100 " keep 100 lines of history
set ruler " show the cursor position
syntax on " syntax highlighting
set hlsearch " highlight the last searched term
filetype plugin on " use the file type plugins " When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif

 然后退出vim 再开一个,颜色亮起来了

上一篇:Sublime Text 使用教程


下一篇:jenkins登录后页面显示为空的问题