Stop Vim From Indenting Public/Private/Protected

It always bugged me that Vim indents the code following public, private, or protected. It seems like a waste of space. Here’s how to turn it off.

Assuming you are already using cindent, simply add this to your vimrc:


    set cinoptions=h0

See the official vim indent documentation for full details.

Advertisements


%d bloggers like this: