Vim keybind Bug when remapping g

Bug report

I tried to change replace from to g like this: “g”: “vim:replace” and encountered a bug. I have to hit g twice before pressing a key that i want to replace it with, instead of once.

For example, if hover over the letter I want to change in normal mode and press g then I press any other letter, it does not change the letter I was hovered over, it requires another press of any other key and that key that will replace the one I was hovered over.

I’ve spent hours trying to understand what’s going on. I noticed it happens with z too. My speculation is because both g and z are bound to several other commands that require a press of two keys that it is waiting for me to press the second key or something.

To try and combat some of the functionality i tried setting a lot of the dual keybinds to native like so, but still no luck.

"g j": "native!",
"g v": "native!",
"g k": "native!",
"g g": "native!"

Any idea why?


  • Platform: Windows 10 Home
  • App Version: 5.5.3

How to reproduce

In keymaps.cson put this. Then try a replace with g and notice that it takes an extra keystroke to do what other letters do in 1.

"g j": "native!",
"g v": "native!",
"g k": "native!",
"g g": "native!",
"G": "native!",
"shift-G": "native!",
"g e": "native!",
"g shift-E": "native!",
"g _": "native!",
"g ~": "native!",
"g u": "native!",
"g U": "native!",
"g shift-U": "native!",

"g": "vim:replace",

Hi Chris,

Thanks for the report.
Unfortunately, there is no way to unbind keymaps by design originally from Atom Editor.
Keymaps for Vim are defined here:

You have to manually remove those keymaps that start with “g” from the keymaps/vim.json.

Personally, I wouldn’t recommend remapping the single stroke of “g” as it affects a lot of the default behaviors of Vim.

Makes sense, I appreciate the reply.