默認狀況下,使用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