]> git.rmz.io Git - dotfiles.git/blobdiff - vim/ftplugin/cpp.vim
vim/cpp: add mappings for Termdebug
[dotfiles.git] / vim / ftplugin / cpp.vim
index 807ef891e41bfad1ea772d5db80f05d92fb7de3e..ec68cf23bbefc7478ba8e4fa06361d81546652c7 100644 (file)
@@ -62,6 +62,12 @@ vnoremap <buffer> = :YcmCompleter Format<CR>
 nnoremap <buffer>g= =
 vnoremap <buffer>g= =
 
+" hover popup
+let g:ycm_auto_hover = ''
+let b:ycm_hover = { 'command': 'GetDoc', 'syntax': &filetype }
+nmap <buffer> gh <plug>(YCMHover)
+nmap <buffer> gH :YcmCompleter GetDoc<CR>
+
 setlocal errorformat=
 setlocal errorformat+=%f:%l:%c:\ %trror:\ %m
 setlocal errorformat+=%f:%l:%c:\ %tarning:\ %m
@@ -85,6 +91,10 @@ function! s:Debug(...)
     nnoremap <buffer> <C-S> :Step<CR>
     nnoremap <buffer> <C-N> :Over<CR>
     nnoremap <buffer> <C-F> :Finish<CR>
+    nnoremap <buffer> <C-T> :call TermDebugSendCommand('advance -source '.expand('%').' -line '.line("."))<CR>
+    nnoremap <buffer> <C-S> :Step<CR>
+    nnoremap <buffer> <C-N> :Over<CR>
+    nnoremap <buffer> <C-F> :Finish<CR>
 endfunction
 command! -nargs=* -complete=file -bang Debug call <SID>Debug() | Termdebug<bang> <args>
 command! -nargs=+ -complete=file -bang DebugCommand call <SID>Debug() | TermdebugCommand<bang> <args>