Search code examples
ideavim

How Do I delete a remap from .ideavim?


Am using intelij and Ideavim. I remapped Esc to gh by typing inoremap gh <Esc> in .ideavimrc and its been working fine. Recently, I found out that while typing a word like "Highlight", the gh inbetween will always be read as gh and then vim will move out of insert mode.

I've tried to revert it by deleting the content in .ideavim but the old gh is still working. I've also tried changing it to gg and then to jj in an attempt to may be erase the old gh, but they seem to be pilling up.

When I type in :imap, I see this enter image description here

And all three of them, gg, gh, and jj are all working as Esc when in insert mode.

How do I get rid of the rest and leave only jj?

I've also tried a lot of suggestions, like using iumap or umap but it doesn't seem to be working. Am on windows.


Solution

  • The solution was imapclear. This cleared all the previous remaps I made. Note, it will clear only the remaps that are effective in insert mode only. Here is a very usefully resource that helped me https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1)