summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2022-03-07 17:46:54 +0100
committerAhmed Abdelhalim <[email protected]>2022-03-07 17:46:54 +0100
commit0f74e96fe51dbadfda314869d4ab8636aa333545 (patch)
tree8f16f64f2af519b03bd98891ab2bcd1af9aed5cf
parent3949a48326baf224747dfda8d4226232184d096c (diff)
Update YCM useful shortcuts/mappings
-rw-r--r--.vimrc11
1 files changed, 8 insertions, 3 deletions
diff --git a/.vimrc b/.vimrc
index 2d4feca..15b6a6d 100644
--- a/.vimrc
+++ b/.vimrc
@@ -26,7 +26,7 @@ Plug 'airblade/vim-gitgutter'
" Plug 'ngmy/vim-rubocop'
Plug 'honza/vim-snippets'
Plug 'majutsushi/tagbar'
-Plug 'kkoomen/vim-doge'
+" Plug 'kkoomen/vim-doge'
Plug 'nvie/vim-flake8'
Plug 'leafgarland/typescript-vim'
Plug 'Quramy/tsuquyomi'
@@ -140,6 +140,7 @@ autocmd BufNewFile,BufRead *.json.jbuilder set filetype=ruby " for ruby json te
autocmd BufNewFile,BufRead,BufReadPost *.tsx set syntax=javascript " better tsx highlighting than polyglot defaults
" autocmd FileType markdown setlocal spell " spell check markdown files
autocmd FileType gitcommit setlocal spell " spell check commits
+autocmd FileType gitcommit set complete+=spell " spell complete with CTRL+N/CTRL+P
autocmd FileType ruby setlocal nospell " disable spell checking for ruby documentation
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => MISC
@@ -159,6 +160,12 @@ let g:ycm_auto_hover=''
let g:ycm_enable_diagnostic_signs = 1
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
+
+nnoremap <C-]> :YcmCompleter GoTo<CR>
+nmap <F7> <Plug>(YCMFindSymbolInWorkspace)
+nnoremap <Leader>r :YcmCompleter Format<CR>
+nnoremap <Leader>d :YcmCompleter GetDoc<CR>
+
" Python pipenv auto complete
let pipenv_venv_path = system('pipenv --venv')
if shell_error == 0
@@ -239,8 +246,6 @@ let g:mta_filetypes = { 'html' : 1 }
"=======
let g:vimrubocop_keymap = 0
let g:vimrubocop_rubocop_cmd = 'bundle exec rubocop '
-nmap <Leader>r :RuboCop<CR>
-nmap <Leader>R :RuboCop -a<CR>
"Limelight
"=========