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.

0 Responses to “Stop Vim From Indenting Public/Private/Protected”


  1. No Comments

Leave a Reply




Creative Commons Attribution-NonCommercial 3.0 United States
Creative Commons Attribution-NonCommercial 3.0 United States