Skip to content

Commit 00a1543

Browse files
authored
Merge pull request #823 from puremourning/run-to-cursor-vs
Add C-F10 mapping for RunToCursor in VS
2 parents 50fe508 + 4fa0bc9 commit 00a1543

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,16 @@ let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
738738
| `F9` | `<Plug>VimspectorToggleBreakpoint` | Toggle line breakpoint on the current line.
739739
| `Shift F9` | `<Plug>VimspectorAddFunctionBreakpoint` | Add a function breakpoint for the expression under cursor
740740
| `F10` | `<Plug>VimspectorStepOver` | Step Over
741+
| `Ctrl F10` | `<Plug>VimspectorRunToCursor` | Run to cursor*
741742
| `F11` | `<Plug>VimspectorStepInto` | Step Into
742743
| `Shift F11` | `<Plug>VimspectorStepOut` | Step out of current function scope
743744
| `Alt 8` | `<Plug>VimspectorDisassemble` | Show disassembly
744745

746+
***NOTE: Some mappings, such as ctrl and F-keys may not work depending on your
747+
terminal, keyboard, windowing system and all sorts of other things.
748+
See `:help modifyOtherKeys` and other sources. If you are unable to make this
749+
work, just use the "human mode" mappings.***
750+
745751
## Human Mode
746752

747753
If, like me, you only have 2 hands and 10 fingers, you probably don't like

plugin/vimspector.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ if s:mappings ==# 'VISUAL_STUDIO'
130130
nmap <F9> <Plug>VimspectorToggleBreakpoint
131131
nmap <S-F9> <Plug>VimspectorAddFunctionBreakpoint
132132
nmap <F10> <Plug>VimspectorStepOver
133+
nmap <C-F10> <Plug>VimspectorRunToCursor
133134
nmap <F11> <Plug>VimspectorStepInto
134135
nmap <S-F11> <Plug>VimspectorStepOut
135136
nmap <M-8> <Plug>VimspectorDisassemble

tests/mappings.test.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function! Test_Mappings_Are_Added_VISUAL_STUDIO()
4545
call assert_true( hasmapto( 'vimspector#StepOver()' ) )
4646
call assert_true( hasmapto( 'vimspector#StepInto()' ) )
4747
call assert_true( hasmapto( 'vimspector#StepOut()' ) )
48+
call assert_true( hasmapto( 'vimspector#RunToCursor()' ) )
4849
endfunction
4950

5051
function! SetUp_Test_Use_Mappings_HUMAN()

0 commit comments

Comments
 (0)