Set .vimrc - derekreiger/teaching-planner GitHub Wiki
To change indent to 4 spaces for >>, <<, and TAB as well as set autoindent and smartindent:
$ vi ~/.vimrc
set expandtab "Use softtabstop spaces instead of tab characters for indentation
set shiftwidth=4 "Indent by 4 spaces when using >>, <<, == etc.
set softtabstop=4 "Indent by 4 spaces when pressing <TAB>
set autoindent "Keep indentation from previous line
set smartindent "Automatically inserts indentation in some cases
set cindent "Like smartindent, but stricter and more customisable
if has ("autocmd")
" File type detection. Indent based on filetype. Recommended.
filetype plugin indent on
endif