Document indent options & check they exist

This commit is contained in:
Kenneth Benzie 2017-05-03 22:16:46 +01:00
parent 22a36a177a
commit 7df1cb7b26

View File

@ -4,8 +4,21 @@ set tabstop=2
set shiftwidth=2 set shiftwidth=2
set softtabstop=2 set softtabstop=2
if has('smartindent')
" Do smart autoindenting when starting a new line
set smartindent set smartindent
endif
" Copy indent from current line when starting a new line
set autoindent set autoindent
" Code if has('cindent')
set cino=N-sg1h1l1(0 " The 'cinoptions' affect the way 'cindent' re-indents lines in a C program.
" * N-s - don't indent inside C++ namespace
" * E-s - don't indent inside C++ extern "C"
" * g1 - indent scope declarations {public,private,protected} 1 space
" * h1 - indent statements after scope declarations 1 space more
" * l1 - indent case statement scopes with the case label
" * (0 - don't indent inside unclosed parenthesis
" * i4 - indent C++ class base declarations and constructor initializers
set cinoptions=N-sE-sg1h1l(01i4
endif