vim:autoindent不工作

我的autoindent不工作,任何诊断测试找出来?

我的“:设置”是:

:set --- Options --- cindent laststatus = 2 scroll = 17
tabstop = 4 window = 36
filetype = cpp编号
smartindent ttyfast
helplang = en粘贴
语法= cpp ttymouse = xterm2
退格=缩进,EOL,开始
fileencoding = UTF-8
fileencodings = ucs-bom,utf-8,默认,latin1 printoptions =纸:字母
runtimepath =〜/ .vim,/ var / lib / vim / addons,/ usr / share / vim / vimfiles,/ usr / share / vim / vim72,/ usr / share / vim / vimfiles / /vim/addons/after,~/.vim/after后缀= .bak,〜,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb, .IND,.IDX,.ilg,.INX,.OUT,.TOC


尝试:

:set ai

要么:

:set autoindent

找到更多关于自动缩进的信息:

:h ai

否则,这可能与文件类型检测有关。


您应该关闭smartindent并使用:filetype indent oncindent (这似乎也是设置)。


我有同样的问题,这些设置修复了它。

filetype on
filetype plugin on
filetype indent on
链接地址: http://www.djcxy.com/p/49515.html

上一篇: vim: autoindent not working

下一篇: Scrolling Vim relative to cursor, custom mapping