X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/0cb2444e9d2745c7ca4c9bcd7c2ea5e1f11ff9f7..58d46aa2146196e37a219175ae5710588d2bb6b2:/vim/ftplugin/cpp.vim diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim index af391a1..be1b64d 100644 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@ -24,6 +24,23 @@ 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 +setlocal errorformat+=%D%*\\a[%*\\d]:\ Entering\ directory\ [`']%f' +setlocal errorformat+=%X%*\\a[%*\\d]:\ Leaving\ directory\ [`']%f' +setlocal errorformat+=%D%*\\a:\ Entering\ directory\ [`']%f' +setlocal errorformat+=%X%*\\a:\ Leaving\ directory\ [`']%f' +setlocal errorformat+=%*[^[]\[%tRROR\]%m\ \[%f:%l\] +setlocal errorformat+=%*[^[]\[%tARNING\]%m\ \[%f:%l\] + setlocal foldmethod=syntax " set foldlevel according to number of matches of 'namespace' and 'class' not " containing ';'