let g:clang_format#style_options = { \ "AccessModifierOffset" : -4, \ "AllowShortIfStatementsOnASingleLine" : "true", \ "AlwaysBreakTemplateDeclarations" : "true", \ "Standard" : "C++11"} augroup ClangFormatSettings " map to cf in C++ code autocmd FileType c,cpp,objc nnoremap cf :ClangFormat autocmd FileType c,cpp,objc vnoremap cf :ClangFormat augroup END