默认状况下,使用vim打开文本文件都是灰蒙蒙的一片,当咱们要在其中查询某个字符的时候也看的不清楚。可是,有办法解决这种困境。vim
主要是修改~/.vimrc
文件code
文件内容以下:orm
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
保存退出便可。cmd