How to set vim to not indent namespace content in C++?
namespace < identifier >
{
< statement_list > // Unwanted indentation
}
As many have mentioned Google C++ style is quite good.
I 'd recommend to install clang-format which I find it better than the recommended plugins, and then install a vim plugin on top.
sudo apt-get install clang-format
// or for older versions:
sudo apt-get install clang-format-3.6
brew install clang-format
rhysd/vim-clang-format
Install using your favorite plugin manager.
Checkout the plugin's link for more options. The default style is google, but there is also llvm and others.
One option you might need if you are using a custom version of the command is for
example:
let g:clang_format#command ="clang-format-3.6"