When I write code, I'd like to use ANSI C style, but the code style in c.vim
template is K&R.
Where can I get another template or any other plugin instead of c.vim
?
You should check :help cinoptions-value
and define your own C style.
IIRC, you need to set cindent
so that cinoptions are taken into account.
FWIW, it is what I do when opening a C or h file :
setlocal cinoptions={0,:1s,g1s,t0,(0,=.5s
setlocal noautoindent
setlocal nosmartindent
setlocal cindent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With