X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/2853b0a2519ac22350f6fb41e2c23e1fc854f0de..32a180d2d9ce65bca5e463d42c3e6d6ab918b8b7:/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 ';'