diff options
| author | Tuowen Zhao <ztuowen@gmail.com> | 2018-03-13 15:05:40 -0600 | 
|---|---|---|
| committer | Tuowen Zhao <ztuowen@gmail.com> | 2018-03-13 15:05:40 -0600 | 
| commit | 6206cbfb71a39048314314d9d0f00e97a43b95f2 (patch) | |
| tree | f51754f41a4706689d4b4cced438e7c9a025b755 /config | |
| parent | e8ed3462bb066dbbf4860c378ee2d657896a2857 (diff) | |
| download | vim-6206cbfb71a39048314314d9d0f00e97a43b95f2.tar.gz vim-6206cbfb71a39048314314d9d0f00e97a43b95f2.tar.bz2 vim-6206cbfb71a39048314314d9d0f00e97a43b95f2.zip | |
Add clang-format
Diffstat (limited to 'config')
| -rw-r--r-- | config/clang-format.vim | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/config/clang-format.vim b/config/clang-format.vim new file mode 100644 index 0000000..7ccd24a --- /dev/null +++ b/config/clang-format.vim @@ -0,0 +1,11 @@ +let g:clang_format#style_options = { +            \ "AccessModifierOffset" : -4, +            \ "AllowShortIfStatementsOnASingleLine" : "true", +            \ "AlwaysBreakTemplateDeclarations" : "true", +            \ "Standard" : "C++11"} + +augroup ClangFormatSettings +  " map to <Leader>cf in C++ code +  autocmd FileType c,cpp,objc nnoremap <buffer><Leader>cf :<C-u>ClangFormat<CR> +  autocmd FileType c,cpp,objc vnoremap <buffer><Leader>cf :ClangFormat<CR> +augroup END | 
