From: Samir Benmendil Date: Thu, 15 Sep 2016 12:38:57 +0000 (+0100) Subject: vim: add clang-format plugin X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/58d46aa2146196e37a219175ae5710588d2bb6b2?ds=sidebyside vim: add clang-format plugin --- diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim index 542503a..be1b64d 100644 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@ -24,6 +24,13 @@ augroup END nnoremap gd :YcmCompleter GoTo nnoremap d :vs:YcmCompleter GoTo +" format with = +map = (operator-clang-format) +vnoremap = :ClangFormat +" restore = mapping to g= +nnoremap g= = +vnoremap g= = + setlocal errorformat= setlocal errorformat+=%f:%l:%c:\ %trror:\ %m setlocal errorformat+=%f:%l:%c:\ %tarning:\ %m diff --git a/vim/vimrc b/vim/vimrc index c6aee80..1d92925 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -69,6 +69,7 @@ Plugin 'ompugao/ctrlp-ros' Plugin 'vim-latex/vim-latex' Plugin 'alx741/vinfo' Plugin 'derekwyatt/vim-protodef' +Plugin 'ram-z/vim-clang-format' " needs editing colorscheme " Plugin 'jeaye/color_coded' " Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp