X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/4123a957a1a2cd85767bf0a059501543b321c4fe..e48f84d521de72d8f39997054e57ae43f44c0d4b:/vim/ftplugin/cpp.vim 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