X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/4123a957a1a2cd85767bf0a059501543b321c4fe..aeecb4f5dde5ef4ffbcdc27940616fdd24b8d29d:/vim/ftplugin/cpp.vim?ds=sidebyside diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim index 7984c68..edc1f32 100644 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@ -6,6 +6,8 @@ setlocal tabstop=4 setlocal softtabstop=4 setlocal expandtab +"TODO these are ignored because we set indentexpr in `indent/cpp.vim` +" Ideally, indentexpr should read the settings from .clang-format if it exists setlocal nosmartindent setlocal autoindent setlocal cinkeys-=0# " don't reindent PP directives @@ -69,6 +71,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