bug: remapping hjkl in nvim config leads to issues with visual mode
Author: shdwpCreated Jul 9, 2026Updated Jul 10, 2026
Check the following:
- I have tried setting
vscode-neovim.neovimCleanin VSCode settings and restarting VSCode. - I have read the vscode-neovim docs.
- I have searched existing (closed!) issues.
Neovim version (nvim -v)
0.12.2
VSCode version and flavor (Cursor, vscodium, …)
VS Code 1.125.0
Operating system/version
Win 11
Problem (including log messages)
If you remap hjkl keys to something else (because of non qwerty kb layout), visual mode doesn't work well. The selection lags behind, and if you need to change direction from (doing right-iiii first and then trying to do left-m) it takes multiple key presses for the cursor to get going in that direction.
If there's a way to remap the keys in the extension without putting that in nvim -- I'd try to use that, but I haven't found it.
Steps To Reproduce
- Add to neovim config:
local simple_remap = function(a, b)
local modes = { "n", "x", "o" }
local options = { noremap = true, silent = true }
vim.keymap.set(modes, a, b, options)
end
simple_remap("H", "^")
simple_remap("L", "$")
simple_remap("H", "^")
simple_remap("L", "$")
-- Colemak
simple_remap("j", "n")
simple_remap("n", "j")
simple_remap("k", "e")
simple_remap("e", "k")
simple_remap("m", "h")
simple_remap("h", "m")
simple_remap("l", "i")
simple_remap("i", "l")
simple_remap("J", "N")
simple_remap("N", "J")
simple_remap("K", "E")
simple_remap("E", "K")
simple_remap("L", "I")
simple_remap("I", "$")
simple_remap("M", "^")
simple_remap("H", "M")Go into visual selection mode
Keys
m, idoesn't function properly.
Expected Behavior
Keys function properly after remapping in visual mode.
Source: vscode-neovim/vscode-neovim