天天看點

vim 常用設定

手動排版:

首先用shift+gg定位到最後,鍵入=, 最後gg定位到開頭

.vimrc設定

"文法高亮
systax on

"行号
set nu

"tab等于4個空格
set tabstop=4
set softtabstop=4

"自動排版:
set cindent
set shiftwidth=4
set autoindent shiftwidth=4
set autoindent
set backspace=indent,eol,start

"行高亮::
hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
set cursorline

"列高亮:
hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
set cursorcolumn