X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/cabc8c44dfafcab5e64a5c9d27aec7e1f0676a39..c245e859bbcb0720650e562d28da174ccdafe88c:/vim/ftplugin/cpp.vim diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim index 06d4861..a8c9a51 100644 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@ -63,6 +63,16 @@ setlocal errorformat+=%X%*\\a:\ Leaving\ directory\ [`']%f' setlocal errorformat+=%*[^[]\[%tRROR\]%m\ \[%f:%l\] setlocal errorformat+=%*[^[]\[%tARNING\]%m\ \[%f:%l\] +packadd termdebug +let g:termdebug_wide = 1 +function! s:Debug(...) + tabedit % + let t:debug_tab=1 + au BufDelete !gdb ++once if exists('t:debug_tab') | tabclose | endif +endfunction +command! -nargs=* -complete=file -bang Debug call Debug() | Termdebug +command! -nargs=+ -complete=file -bang DebugCommand call Debug() | TermdebugCommand + setlocal foldmethod=syntax " set foldlevel according to number of matches of 'namespace' and 'class' not " containing ';'