diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2020-07-09 01:10:36 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2020-07-09 01:10:36 +0200 |
commit | faeb7cab78f10b8359b2fa86a96e6861e2b86e3f (patch) | |
tree | 6925703f1977533e92f621a61ef929fd3f36be7e /files/vim/ftplugin/cpp/cpp.vim | |
parent | bac1cf42d0ae8c0afdaf843b6dbff494b30354d9 (diff) | |
download | configs-faeb7cab78f10b8359b2fa86a96e6861e2b86e3f.tar.gz configs-faeb7cab78f10b8359b2fa86a96e6861e2b86e3f.zip |
Trying space as leader for vim ftplugins.
Diffstat (limited to 'files/vim/ftplugin/cpp/cpp.vim')
-rw-r--r-- | files/vim/ftplugin/cpp/cpp.vim | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/files/vim/ftplugin/cpp/cpp.vim b/files/vim/ftplugin/cpp/cpp.vim index 6b4807d..e2072c1 100644 --- a/files/vim/ftplugin/cpp/cpp.vim +++ b/files/vim/ftplugin/cpp/cpp.vim @@ -1,24 +1,28 @@ " ~/.vim/ftplugin/cpp/cpp.vim " C++-specific vim configuration -highlight Comment ctermfg=darkgreen +let mapleader = " " " Column marker: 80 characters -call matchadd('ColorColumn', '\%81v', 100) +match ColorColumn /\%81v/ +setlocal textwidth=80 nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/cpp/cpp.vim<CR> nnoremap <buffer> <leader>E :Errors<CR> nnoremap <buffer> <leader>c :w<CR>:!g++ "%"; ./a.out<Space> -nnoremap <buffer> <leader>E :Errors<CR> -nnoremap <buffer> <leader>gt :YcmCompleter GoTo<CR> -nnoremap <buffer> <leader>gr :YcmCompleter GoToReferences<CR> -nnoremap <buffer> <leader>gd :YcmCompleter GetDoc<CR> -nnoremap <buffer> <leader>gT :YcmCompleter GetType<CR> +nnoremap <buffer> gd :YcmCompleter GoTo<CR> +nnoremap <buffer> gr :YcmCompleter GoToReferences<CR> +nnoremap <buffer> gh :YcmCompleter GetType<CR> +nnoremap <buffer> gD :YcmCompleter GetDoc<CR> +nnoremap <buffer> gR :YcmCompleter RefactorRename<Space> nnoremap <buffer> <leader>fi :YcmCompleter FixIt<CR> nnoremap <buffer> <leader>e :YcmDiags<CR> +nnoremap <buffer> <leader>temp :-1r ~/.vim/ftplugin/cpp/snips/template.txt<CR>Gdd?<+++><CR>cf> + +let mapleader = "," + inoremap <buffer> <leader>if if (<+++>) {<CR><++><CR>}?<+++><CR>cf> inoremap <buffer> <leader>for for (<+++>; <++>; <++>) {<CR><++><CR>}?<+++><CR>cf> -nnoremap <buffer> <leader>temp :-1r ~/.vim/ftplugin/cpp/snips/template.txt<CR>Gdd?<+++><CR>cf> |