Vim: autoindent not working

vivim

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

Best Answer

try:

:set ai

or:

:set autoindent

find more about auto-indent:

:h ai

Otherwise, it's might be something with file type detection.