`<C-o>` doesn't work in Replace mode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
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:
- Add the following to settings.json:
"vim.insertModeKeyBindingsNonRecursive": [ { "before": ["<down>"], "after": ["<C-o>", "g", "j"] }, { "before": ["<up>"], "after": ["<C-o>", "g", "k"] }, ] - Open any file in the editor
- Insert some text if not already present
- Place the text caret on a line with text on it
- Press Shift-R, which transitions vim into REPLACE mode
- Press the Up or Down arrow
- Watch as
gjorgkis 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the settings.json insertModeKeyBindingsNonRecursive mappings, then trace the Replace mode handling for and key sequences such as gj and gk. Done means the Up and Down mappings move the caret in Replace mode without inserting those characters, while the existing Insert mode behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100