" " Mappings and settings for C " set cindent set formatoptions+=o2r set filetype=c set syntax=c " " C indenting options " {1s -> Place opening braces N characters from prevailing indent. " :0 -> Place case labels N characters from the indent of the switch(). " t0 -> Indent a function return type declaration N chars from margin. " set cinoptions={1s,:0,t0,>2s,^-1s,n-1s set textwidth=0 set sw=2 set comments=sr:/*,el:*/ "syn region myFold start="^{" end="^}" transparent fold "if version >= 600 " syn sync fromstart " set foldmethod=syntax " " Don't fold by default. " set foldlevel=9999 "endif "if !(&readonly) && exists("loaded_vimspell") " :SpellAutoEnable "endif map O0i//--------------------------------------------------------------------------- map 0i// map O0i/*--------------------------------------------------------------------------- map O0i---------------------------------------------------------------------------*/ map :set ts=8 noexpandtab sw=8 textwidth=0 nopaste map :set ts=8 noexpandtab sw=2 textwidth=70 nopaste map O0i/* FIXME. DOCUMENT. */ map :set ts=8 noexpandtab sw=2 textwidth=80 nopaste "map f :g/^[a-zA-Z0-9:~_]* *(.*[,)]$/nu map f :Tlist map t :g/^\(class\\|struct\\|enum\) .*/nu map f map t " set shellpipe=\|&ccfilter\ -v\> " set errorformat=%f:%l:%c:%t:%m " if %:e == "cc" " set mp=make\ \\\|&\ cc-error-filter " else " set mp=make " endif set makeprg=make autocmd BufLeave *.dot,*.vcg,*.cc,*.C,*.c,*.h set nocindent formatoptions-=o2r