visualModeKeyBindingsNonRecursive and visualModeKeyBindings don't work for first key pressed after visual mode is entered
See original GitHub issueColemak users remap hjkl to snei (as hjkl are in ridiculous places using our keyboard layout).
Here is a config representing how we remap the n
key and can be used to reproduce this issue using the subsequent steps:
"vim.visualModeKeyBindingsNonRecursive": [
{ "before": "n", "after": "j" }
],
With this config if you type vnn
the first n
acts as if n
hasn’t been remapped to j
and jumps to the “next match”. After this n
works as expected (so the second n
there cause a down movement). I can also do:
v<left-arrow>n
and then n
will come out fine. So it’s only for the very first key-press after visual mode has been entered.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:19 (15 by maintainers)
Top Results From Across the Web
Why is `vmap` for both Visual *and* Select mode?
Select mode is similar to Visual mode in some senses, but different in that when a printable character is typed, Vim will replace...
Read more >How to use vim (key-bindings) with Visual Studio Code vim ...
Add the following to settings.json (open the Command Pallete and search for "User Settings"): "vim.insertModeKeyBindings": [ { "before": ...
Read more >Visual Studio Code: Keyboard not working Permanent FIX
This brings a fix to visual studio when you cannot use the editor because it's not getting the keyboard input. Common questionsIn my...
Read more >CHANGELOG.md · rzzhuzhen/Vim - Gitee.com
Visual mode cannot be navigated with up/down arrow keys #5029; gJ doesn't work in visual mode #5027; Shortcut asterisk (wildcard) key ...
Read more >Keymap - Helix
Accessed by typing Ctrl-w in normal mode. This layer is similar to Vim keybindings as Kakoune does not support window. Key, Description, Command....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, thanks for pointing that out @hioki-daichi. After doing a bit of research, this seems inline with the behaviour for vanilla vim. If that conclusion is incorrect, let me know.
I think this issue was ultimately resolved with https://github.com/VSCodeVim/Vim/pull/3424 and with https://github.com/VSCodeVim/Vim/pull/3440, I’ll be adding some validation around the remap to ensure that a string array is used.
@jpoon The minimal config to reproduce this is:
then just follow the instructions in the issue description.