|
1 | 1 |
|
| 2 | +function! s:recordCall(...) |
| 3 | + let l:func=a:1 |
| 4 | + let l:args=a:000[1:] |
| 5 | + call call(l:func,l:args) |
2 | 6 |
|
3 | | -command! -nargs=1 VBGrawWrite call vebugger#writeLine(<q-args>) |
| 7 | + if(exists('*VBGpostcmd')) |
| 8 | + call VBGpostcmd(l:func,l:args) |
| 9 | + endif |
| 10 | +endfunction |
| 11 | + |
| 12 | +command! -nargs=1 VBGrawWrite call s:recordCall('vebugger#writeLine',<q-args>) |
4 | 13 | command! -nargs=0 VBGkill call vebugger#killDebugger() |
5 | 14 |
|
6 | | -command! -nargs=0 VBGstepIn call vebugger#setWriteActionAndPerform('std','flow','stepin') |
7 | | -command! -nargs=0 VBGstepOver call vebugger#setWriteActionAndPerform('std','flow','stepover') |
8 | | -command! -nargs=0 VBGstepOut call vebugger#setWriteActionAndPerform('std','flow','stepout') |
9 | | -command! -nargs=0 VBGcontinue call vebugger#setWriteActionAndPerform('std','flow','continue') |
| 15 | +command! -nargs=0 VBGstepIn call s:recordCall('vebugger#setWriteActionAndPerform','std','flow','stepin') |
| 16 | +command! -nargs=0 VBGstepOver call s:recordCall('vebugger#setWriteActionAndPerform','std','flow','stepover') |
| 17 | +command! -nargs=0 VBGstepOut call s:recordCall('vebugger#setWriteActionAndPerform','std','flow','stepout') |
| 18 | +command! -nargs=0 VBGcontinue call s:recordCall('vebugger#setWriteActionAndPerform','std','flow','continue') |
10 | 19 |
|
11 | 20 | command! -nargs=0 VBGtoggleTerminalBuffer call vebugger#toggleTerminalBuffer() |
12 | 21 | command! -nargs=+ -complete=file VBGtoggleBreakpoint call vebugger#std#toggleBreakpoint(<f-args>) |
13 | | -command! -nargs=0 VBGtoggleBreakpointThisLine call vebugger#std#toggleBreakpoint(expand('%:~:.'),line('.')) |
| 22 | +command! -nargs=0 VBGtoggleBreakpointThisLine call s:recordCall('vebugger#std#toggleBreakpoint', expand('%:~:.'),line('.')) |
14 | 23 | command! -nargs=0 VBGclearBreakpints call vebugger#std#clearBreakpoints() |
15 | 24 |
|
16 | | -command! -nargs=1 VBGeval call vebugger#std#eval(<q-args>) |
17 | | -command! -nargs=0 VBGevalWordUnderCursor call vebugger#std#eval(expand('<cword>')) |
18 | | -command! -nargs=1 VBGexecute call vebugger#std#execute(<q-args>) |
| 25 | +command! -nargs=1 VBGeval call s:recordCall('vebugger#std#eval',<q-args>) |
| 26 | +command! -nargs=0 VBGevalWordUnderCursor call s:recordCall('vebugger#std#eval',expand('<cword>')) |
| 27 | +command! -nargs=1 VBGexecute call s:recordCall('vebugger#std#execute',<q-args>) |
19 | 28 |
|
20 | | -command! -range -nargs=0 VBGevalSelectedText call vebugger#std#eval(vebugger#util#get_visual_selection()) |
21 | | -command! -range -nargs=0 VBGexecuteSelectedText call vebugger#std#execute(vebugger#util#get_visual_selection()) |
22 | | -command! -range -nargs=0 VBGrawWriteSelectedText call vebugger#writeLine(vebugger#util#get_visual_selection()) |
| 29 | +command! -range -nargs=0 VBGevalSelectedText call s:recordCall('vebugger#std#eval',vebugger#util#get_visual_selection()) |
| 30 | +command! -range -nargs=0 VBGexecuteSelectedText call s:recordCall('vebugger#std#execute',vebugger#util#get_visual_selection()) |
| 31 | +command! -range -nargs=0 VBGrawWriteSelectedText call s:recordCall('vebugger#writeLine',vebugger#util#get_visual_selection()) |
23 | 32 |
|
24 | 33 | command! -nargs=+ -complete=file VBGstartGDB call vebugger#gdb#start([<f-args>][0],{'args':[<f-args>][1:]}) |
25 | 34 | command! -nargs=1 -complete=file VBGattachGDB call vebugger#gdb#searchAndAttach(<q-args>) |
|
0 commit comments