vim: autoindent not working
my autoindent is not working, any diagnostic tests to figure it out?
my ":set" is:
:set --- Options --- cindent laststatus=2 scroll=17
tabstop=4 window=36
filetype=cpp number
smartindent ttyfast
helplang=en paste
syntax=cpp ttymouse=xterm2
backspace=indent,eol,start
fileencoding=utf-8
fileencodings=ucs-bom,utf-8,default,latin1 printoptions=paper:letter
runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/af ter,/var/lib/vim/addons/after,~/.vim/after suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
try:
:set ai
or:
:set autoindent
find more about auto-indent:
:h ai
Otherwise, it's might be something with file type detection.
您应该关闭smartindent
并使用:filetype indent on
和cindent
(这似乎也是设置)。
我有同样的问题,这些设置修复了它。
filetype on
filetype plugin on
filetype indent on
链接地址: http://www.djcxy.com/p/49516.html
上一篇: 如何在VIM中expandtab选项为ON时插入Tab字符
下一篇: vim:autoindent不工作