Update README

This commit is contained in:
Ben Jackson 2021-03-12 20:10:55 +00:00
commit f3f458cdc7
2 changed files with 54 additions and 23 deletions

View file

@ -723,6 +723,7 @@ 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()` |
| `<Leader>F5` | Start debugging, do not default the debug profile | `vimspector#Launch( v:true )` |
| `F3` | Stop debugging. | `vimspector#Stop()` | | `F3` | Stop debugging. | `vimspector#Stop()` |
| `F4` | Restart debugging with the same configuration. | `vimspector#Restart()` | | `F4` | Restart debugging with the same configuration. | `vimspector#Restart()` |
| `F6` | Pause debuggee. | `vimspector#Pause()` | | `F6` | Pause debuggee. | `vimspector#Pause()` |
@ -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

View file

@ -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