Update README
This commit is contained in:
parent
7723d58cf8
commit
f3f458cdc7
2 changed files with 54 additions and 23 deletions
51
README.md
51
README.md
|
|
@ -695,17 +695,17 @@ loading vimspector**:
|
||||||
let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
|
let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Key | Function | API |
|
| Key | Function | API |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `F5` | When debugging, continue. Otherwise start debugging. | `vimspector#Continue()` |
|
| `F5` | When debugging, continue. Otherwise start debugging. | `vimspector#Continue()` |
|
||||||
| `Shift F5` | Stop debugging. | `vimspector#Stop()` |
|
| `Shift F5` | Stop debugging. | `vimspector#Stop()` |
|
||||||
| `Ctrl Shift F5` | Restart debugging with the same configuration. | `vimspector#Restart()` |
|
| `Ctrl Shift F5` | Restart debugging with the same configuration. | `vimspector#Restart()` |
|
||||||
| `F6` | Pause debuggee. | `vimspector#Pause()` |
|
| `F6` | Pause debuggee. | `vimspector#Pause()` |
|
||||||
| `F9` | Toggle line breakpoint on the current line. | `vimspector#ToggleBreakpoint()` |
|
| `F9` | Toggle line breakpoint on the current line. | `vimspector#ToggleBreakpoint()` |
|
||||||
| `Shift F9` | Add a function breakpoint for the expression under cursor | `vimspector#AddFunctionBreakpoint( '<cexpr>' )` |
|
| `Shift F9` | Add a function breakpoint for the expression under cursor | `vimspector#AddFunctionBreakpoint( '<cexpr>' )` |
|
||||||
| `F10` | Step Over | `vimspector#StepOver()` |
|
| `F10` | Step Over | `vimspector#StepOver()` |
|
||||||
| `F11` | Step Into | `vimspector#StepInto()` |
|
| `F11` | Step Into | `vimspector#StepInto()` |
|
||||||
| `Shift F11` | Step out of current function scope | `vimspector#StepOut()` |
|
| `Shift F11` | Step out of current function scope | `vimspector#StepOut()` |
|
||||||
|
|
||||||
## Human Mode
|
## Human Mode
|
||||||
|
|
||||||
|
|
@ -720,19 +720,20 @@ loading vimspector**:
|
||||||
let g:vimspector_enable_mappings = 'HUMAN'
|
let g:vimspector_enable_mappings = 'HUMAN'
|
||||||
```
|
```
|
||||||
|
|
||||||
| Key | Function | API |
|
| Key | Function | API |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `F5` | When debugging, continue. Otherwise start debugging. | `vimspector#Continue()` |
|
| `F5` | When debugging, continue. Otherwise start debugging. | `vimspector#Continue()` |
|
||||||
| `F3` | Stop debugging. | `vimspector#Stop()` |
|
| `<Leader>F5` | Start debugging, do not default the debug profile | `vimspector#Launch( v:true )` |
|
||||||
| `F4` | Restart debugging with the same configuration. | `vimspector#Restart()` |
|
| `F3` | Stop debugging. | `vimspector#Stop()` |
|
||||||
| `F6` | Pause debuggee. | `vimspector#Pause()` |
|
| `F4` | Restart debugging with the same configuration. | `vimspector#Restart()` |
|
||||||
| `F9` | Toggle line breakpoint on the current line. | `vimspector#ToggleBreakpoint()` |
|
| `F6` | Pause debuggee. | `vimspector#Pause()` |
|
||||||
|
| `F9` | Toggle line breakpoint on the current line. | `vimspector#ToggleBreakpoint()` |
|
||||||
| `<leader>F9` | Toggle conditional line breakpoint on the current line. | `vimspector#ToggleBreakpoint( { trigger expr, hit count expr } )` |
|
| `<leader>F9` | Toggle conditional line breakpoint on the current line. | `vimspector#ToggleBreakpoint( { trigger expr, hit count expr } )` |
|
||||||
| `F8` | Add a function breakpoint for the expression under cursor | `vimspector#AddFunctionBreakpoint( '<cexpr>' )` |
|
| `F8` | Add a function breakpoint for the expression under cursor | `vimspector#AddFunctionBreakpoint( '<cexpr>' )` |
|
||||||
| `<leader>F8` | Run to Cursor | `vimspector#RunToCursor()` |
|
| `<leader>F8` | Run to Cursor | `vimspector#RunToCursor()` |
|
||||||
| `F10` | Step Over | `vimspector#StepOver()` |
|
| `F10` | Step Over | `vimspector#StepOver()` |
|
||||||
| `F11` | Step Into | `vimspector#StepInto()` |
|
| `F11` | Step Into | `vimspector#StepInto()` |
|
||||||
| `F12` | Step out of current function scope | `vimspector#StepOut()` |
|
| `F12` | Step out of current function scope | `vimspector#StepOut()` |
|
||||||
|
|
||||||
In addition, I recommend adding a mapping to `<Plug>VimspectorBalloonEval`, in
|
In addition, I recommend adding a mapping to `<Plug>VimspectorBalloonEval`, in
|
||||||
normal and visual modes, for example:
|
normal and visual modes, for example:
|
||||||
|
|
@ -746,6 +747,10 @@ nmap <Leader>di <Plug>VimspectorBalloonEval
|
||||||
xmap <Leader>di <Plug>VimspectorBalloonEval
|
xmap <Leader>di <Plug>VimspectorBalloonEval
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you would like to have custom mappings, or mappings active only while
|
||||||
|
debugging, then take a look at the
|
||||||
|
[customisation sectoin](#custom-mappings-while-debugging).
|
||||||
|
|
||||||
# Usage and API
|
# Usage and API
|
||||||
|
|
||||||
This section defines detailed usage instructions, organised by feature. For most
|
This section defines detailed usage instructions, organised by feature. For most
|
||||||
|
|
|
||||||
|
|
@ -141,3 +141,29 @@ function! Test_Use_Mappings_HUMAN()
|
||||||
%bwipeout!
|
%bwipeout!
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! SetUp_Test_Use_Mappings_HUMAN_ForceMenu()
|
||||||
|
let g:vimspector_enable_mappings = 'HUMAN'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! Test_Use_Mappings_HUMAN_ForceMenu()
|
||||||
|
call ThisTestIsFlaky()
|
||||||
|
lcd testdata/cpp/simple
|
||||||
|
edit simple.cpp
|
||||||
|
call setpos( '.', [ 0, 15, 1 ] )
|
||||||
|
|
||||||
|
" Comma is the leader
|
||||||
|
py3 <<EOF
|
||||||
|
from unittest import mock
|
||||||
|
with mock.patch( 'vimspector.utils.SelectFromList', return_value=1 ) as sfl:
|
||||||
|
vim.eval( 'feedkeys( ",\<F5>", "xt" )' )
|
||||||
|
sfl.assert_called()
|
||||||
|
EOF
|
||||||
|
|
||||||
|
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( 'simple.cpp', 15, 1 )
|
||||||
|
|
||||||
|
call vimspector#test#setup#Reset()
|
||||||
|
|
||||||
|
lcd -
|
||||||
|
%bwipeout!
|
||||||
|
endfunction
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue