Skip to content

Commit

Permalink
Add C-F10 mapping for RunToCursor in VS
Browse files Browse the repository at this point in the history
Assuming your terminal and Vim can interpret that key combination.

Fixes #822
  • Loading branch information
puremourning committed Jan 9, 2024
1 parent 703df4d commit baea053
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,16 @@ let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
| `F9` | `<Plug>VimspectorToggleBreakpoint` | Toggle line breakpoint on the current line.
| `Shift F9` | `<Plug>VimspectorAddFunctionBreakpoint` | Add a function breakpoint for the expression under cursor
| `F10` | `<Plug>VimspectorStepOver` | Step Over
| `Ctrl F10` | `<Plug>VimspectorRunToCursor` | Run to cursor*
| `F11` | `<Plug>VimspectorStepInto` | Step Into
| `Shift F11` | `<Plug>VimspectorStepOut` | Step out of current function scope
| `Alt 8` | `<Plug>VimspectorDisassemble` | Show disassembly

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

## Human Mode

If, like me, you only have 2 hands and 10 fingers, you probably don't like
Expand Down
1 change: 1 addition & 0 deletions plugin/vimspector.vim
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ if s:mappings ==# 'VISUAL_STUDIO'
nmap <F9> <Plug>VimspectorToggleBreakpoint
nmap <S-F9> <Plug>VimspectorAddFunctionBreakpoint
nmap <F10> <Plug>VimspectorStepOver
nmap <C-F10> <Plug>VimspectorRunToCursor
nmap <F11> <Plug>VimspectorStepInto
nmap <S-F11> <Plug>VimspectorStepOut
nmap <M-8> <Plug>VimspectorDisassemble
Expand Down
1 change: 1 addition & 0 deletions tests/mappings.test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function! Test_Mappings_Are_Added_VISUAL_STUDIO()
call assert_true( hasmapto( 'vimspector#StepOver()' ) )
call assert_true( hasmapto( 'vimspector#StepInto()' ) )
call assert_true( hasmapto( 'vimspector#StepOut()' ) )
call assert_true( hasmapto( 'vimspector#RunToCursor()' ) )
endfunction

function! SetUp_Test_Use_Mappings_HUMAN()
Expand Down

0 comments on commit baea053

Please sign in to comment.