Add :Debug command
The :Debug command quickly starts a new debugging sessions. * adds the `termdebug` package * invokes `TermdebugCommand` with the given arguments
This commit is contained in:
parent
2414a94684
commit
992096a2a0
@ -68,3 +68,13 @@ function! do#rename_include_guard(old)
|
|||||||
" Jump back to the set mark
|
" Jump back to the set mark
|
||||||
normal 'r
|
normal 'r
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Setup and start a debugging command.
|
||||||
|
function! do#debug(...)
|
||||||
|
packadd termdebug
|
||||||
|
let l:command = 'TermdebugCommand'
|
||||||
|
for l:arg in a:000
|
||||||
|
let l:command = l:command.' '.l:arg
|
||||||
|
endfor
|
||||||
|
exec l:command
|
||||||
|
endfunction
|
||||||
|
@ -14,4 +14,7 @@ command! -nargs=1 TabWidth call do#set_tab_width(<f-args>)
|
|||||||
command! ToggleCheckbox call do#toggle_checkbox()
|
command! ToggleCheckbox call do#toggle_checkbox()
|
||||||
|
|
||||||
" Show highlight groups under the cursor
|
" Show highlight groups under the cursor
|
||||||
command! CursorHighlightGroups :call do#cursor_highlight_groups()
|
command! CursorHighlightGroups call do#cursor_highlight_groups()
|
||||||
|
|
||||||
|
" Setup and invoke a :TermdebugCommand
|
||||||
|
command! -nargs=+ -complete=file Debug call do#debug(<f-args>)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user