2

I am unable to use the <Esc> key to leave insert mode and return to Normal Mode. This has 'apparently' happened without any known change, but could be related to a not-so-recent bump of my IntelliJ version (IntelliJIdea2019.1 -> IntelliJIdea2019.2).

One possible solution mentioned online that I tried was to disable, then re-enable ideaVim in Menu | Tools | Vim emulation. Trying this did not appear to solve the problem.

Joe
  • 678
  • 9
  • 24

5 Answers5

3

Vim mode for IntelliJ IDEA can be toggled via the Menu | Tools | Vim emulation option.

Feedforward
  • 4,521
  • 4
  • 22
  • 34
  • Thanks, it's a good point and a suggestion I found a lot online. I've updated the question and answer to include the fact that it was something I tried and it did not solve the issue in my specific case. – Joe Aug 22 '19 at 09:25
2

ctrl+c worked for me on windows. I was not able to see "vim emulator" in Help->Find Action

Omkar Neogi
  • 675
  • 2
  • 9
  • 30
1

Comparing my working vim_settings.xml file and broken vim_settings.xml file (~/Library/Preferences/IntelliJIdea2019.1/options/vim_settings.xml), I noticed the following element:

<application>
    <component name="VimSettings">
        <state version="4" enabled="false" />

I noticed that when running:

watch "head ~/Library/Preferences/IntelliJIdea2019.1/options/vim_settings.xml"

This file did not update. This was not something I would of expected, so I updated the file manually.

The manually change to this file, changing enabled="false" to enabled="true", fixed this issue for me.

I think this could be a bug related to IdeaVim, but it could even be IntelliJ and happening elsewhere?

Joe
  • 678
  • 9
  • 24
  • 1
    This is not a bug, you've just accordingly disabled vim emulation. See the answer. – Feedforward Aug 20 '19 at 17:17
  • See changes, updated as this answer is found all over the internet, but did not fix the issue in my specific case. – Joe Aug 22 '19 at 09:24
  • Do you mean that `enabled="false"` is not updated after you toggle `tools | Vim emulator`? The files in `options` folders are updated not immediately, but only in some specific cases like IJ instance close, or pressing `apply` button in settings. – Feedforward Aug 22 '19 at 09:33
  • That was the behaviour I was seeing, yes. I'm 99% certain I restarted IJ, but even so it was an issue for me for a number of days, so I was playing with settings a fair bit and I'm sure I toggled IdeaVim off and on a number of times over that period. I've now found that following my manual change, I cannot replicate the issue, so cannot be 100% certain this was happening. – Joe Aug 22 '19 at 14:57
1

Easiest solution is to remove the ESC button, assigned to Switch Focus To Editor.

Settings -> Keymap -> Terminal, Switch Focus To Editor -> remove enter image description here

Mert Aksoy
  • 372
  • 1
  • 4
  • 12
-2

Just press the insert key on your keyboard.