]> git.rmz.io Git - dotfiles.git/commitdiff
vim/cpp: use YcmCompleter Format instead of vim-clang-format
authorSamir Benmendil <me@rmz.io>
Fri, 8 May 2020 14:46:36 +0000 (15:46 +0100)
committerSamir Benmendil <me@rmz.io>
Fri, 8 May 2020 14:46:36 +0000 (15:46 +0100)
vim/ftplugin/cpp.vim
vim/vimrc

index a3155926ebba72feb4306040ac962d7f4568f02f..b54cffd5bdb0f8aa8c110b15196b6acf29f95f0d 100644 (file)
@@ -50,8 +50,9 @@ nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
 nnoremap <buffer> gD :YcmCompleter GoToReferences<CR>
 
 " format with =
-map <buffer> = <Plug>(operator-clang-format)
-vnoremap <buffer> = :ClangFormat<CR>
+call operator#user#define_ex_command('ycmcompleter-format', 'YcmCompleter Format')
+map <buffer> = <Plug>(operator-ycmcompleter-format)
+vnoremap <buffer> = :YcmCompleter Format<CR>
 " restore = mapping to g=
 nnoremap <buffer>g= =
 vnoremap <buffer>g= =
index 504cbd75e94a565bd0cbad51997a146cd192c15e..d69ce50bf9301f2926db05dcd95a06ccdcbb0668 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -31,9 +31,6 @@ Plug 'kshenoy/vim-signature'
 Plug 'majutsushi/tagbar'
 Plug 'octol/vim-cpp-enhanced-highlight'
 Plug 'raimondi/delimitmate'
-Plug 'ram-z/vim-clang-format', { 'branch': 'fix-undo' }
-" fix some issue with vim-clang-format not finding .clang-format
-let g:clang_format#detect_style_file = 1
 Plug 'vimwiki/vimwiki', { 'branch': 'dev' }
 " Plug 'scrooloose/syntastic'
 Plug 'sgeb/vim-diff-fold'