From a908a41cb42d95faed862049b43ee1bd546abe91 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Sun, 1 Mar 2020 22:48:57 +0000 Subject: [PATCH] vim: add some mappings to Debug mode --- vim/ftplugin/cpp.vim | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.48.1