Vim icon indicating copy to clipboard operation
Vim copied to clipboard

`<C-o>` doesn't work in Replace mode

Open mogelbrod opened this issue 2 years ago • 0 comments

Describe the bug Using Ctrl-O (<C-o>) in replace mode seems to do nothing, instead immediately printing out the keys that follow. In vim this mapping works like the insert mode mapping:

CTRL-O execute one command, return to Insert mode i_CTRL-O

To Reproduce Steps to reproduce the behavior:

  1. Add the following to settings.json:
    "vim.insertModeKeyBindingsNonRecursive": [
         { "before": ["<down>"], "after": ["<C-o>", "g", "j"] },
         { "before": ["<up>"], "after": ["<C-o>", "g", "k"] },
    ]
    
  2. Open any file in the editor
  3. Insert some text if not already present
  4. Place the text caret on a line with text on it
  5. Press Shift-R, which transitions vim into REPLACE mode
  6. Press the Up or Down arrow
  7. Watch as gj or gk is inserted into the document, instead of moving the caret

Expected behavior Step 7 should result in the text caret being moved up or down instead of inserting gj/gk.

Environment (please complete the following information):

  • Extension Name: vim
  • Extension Version: 1.23.2
  • OS Version: Darwin arm64 21.3.0
  • VS Code version: 1.70.0

mogelbrod avatar Aug 10 '22 13:08 mogelbrod