From: Samir Benmendil Date: Sun, 1 Mar 2020 22:48:57 +0000 (+0000) Subject: vim: add some mappings to Debug mode X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/a908a41cb42d95faed862049b43ee1bd546abe91 vim: add some mappings to Debug mode --- diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim index 7984c68..2f545a5 100644 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@ -69,6 +69,13 @@ function! s:Debug(...) tabedit % let t:debug_tab=1 au BufDelete !gdb ++once if exists('t:debug_tab') | tabclose | endif + + "TODO restore mappings + "TODO make mappings local to source buffer + nnoremap :call TermDebugSendCommand('advance -source '.expand('%').' -line '.line(".")) + nnoremap :Step + nnoremap :Over + nnoremap :Finish endfunction command! -nargs=* -complete=file -bang Debug call Debug() | Termdebug command! -nargs=+ -complete=file -bang DebugCommand call Debug() | TermdebugCommand