]> git.rmz.io Git - dotfiles.git/commitdiff
vim/cpp: add mappings for Termdebug
authorSamir Benmendil <me@rmz.io>
Fri, 11 Mar 2022 08:56:51 +0000 (08:56 +0000)
committerSamir Benmendil <me@rmz.io>
Fri, 11 Mar 2022 08:56:51 +0000 (08:56 +0000)
vim/ftplugin/cpp.vim

index fcd806606f34c63fa2fe7552fb1134062239aca5..ec68cf23bbefc7478ba8e4fa06361d81546652c7 100644 (file)
@@ -91,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-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>
 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>