Mac OS X中设置VIM语法高亮
Mac OS X中设置VIM语法高亮
酷游博客

Mac OS X中设置VIM语法高亮

酷游
1月22日发布 /正在检测是否收录...

默认情况下,使用vim打开文本文件都是灰蒙蒙的一片,当我们要在其中查询某个字符的时候也看的不清楚。但是,有办法解决这种困境。

主要是修改~/.vimrc文件

文件内容如下:

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

保存退出即可。

© 版权声明
THE END
喜欢就支持一下吧
点赞 0 分享 赞赏
评论
当前页面的评论已关闭
易航博客
SSL