先在配置文件~/.vimrc中设置:
然后输入:set smartindent set tabstop=4 set shiftwidth=4 set expandtab
其中,imap起到映射的功能。imap { {}<ESC>i<CR><ESC>V<O
在这里,将 { 映射为 {}<ESC>i<CR><ESC>V<O
意义很简单,不做解释。
先在配置文件~/.vimrc中设置:
然后输入:set smartindent set tabstop=4 set shiftwidth=4 set expandtab
其中,imap起到映射的功能。imap { {}<ESC>i<CR><ESC>V<O
在这里,将 { 映射为 {}<ESC>i<CR><ESC>V<O
意义很简单,不做解释。