Remapping `j`/`k` to `jzz`/`kzz` in settings.json causes intermittent lock ups.
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
Remapping j or k to also recentre the view via zz in settings.json causes all vscode code areas to lock up (menus and mouse input still work fine, e.g. to select areas of text).
To Reproduce
Put the below in your settings.json:
"vim.normalModeKeyBindings": [
{
"before": ["j"],
"after": ["j", "z", "z"]
},
{
"before": ["k"],
"after": ["k", "z", "z"]
}
]
Now hit j or k a few times in any document. Occasionally it will work for a time, other times it will freeze right away, but either way eventually it will freeze. Restarting vscode will fix this until j or k are hit again. Sometimes you will also end up in insert mode (with normal mode block cursor and powerline), and if that happens all special keys produce an error, e.g. "command 'extension.vim_escape' not found", or "command 'extension.vim_left' not found".
VSCode will need to be restarted in order to function normally again, however the same bug will reoccur if j or k is hit again.
Expected behavior
Hitting j or k with this remap should move up or down own line and centre your view on the current line.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.13.0
- VSCode version: 1.42.1
- OS: Windows 10
Additional context
I believe this also happened with the previous version of vscode, but since it's something I'm only just experimenting with I can't say for certain. Removing and reinstalling vscode vim does not resolve this issue.
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
Reproduce the lockup in VSCode using the supplied settings.json mappings and repeated j/k presses, including the reported insert-mode and command errors. Trace the key-remapping and mode-transition entry points implicated by that reproduction; done means j and k consistently move by line, recenter the view, and leave menus, mouse input, and special keys functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100