Neither one nor Many

 
July 30 2012

Just one thing that was annoying me for a long while, and how I fixed it. I tend to switch back and forth between insert and command mode in vim. And somehow PhpStorm with IdeaVim plugin enabled felt non-responsive. I press escape, start hitting :wq, and I have :wq in my code.

I got accustomed hitting Escape twice, and later even three times, by default so that I was more certain I was out of insert mode. I also tried Control+C, and Control+[, but they have the same problem.

I know the 'problem' always occured when i.e. PhpStorm started rendering an Intellisense popup: press '.' somewhere, in a large file it may take a few moments before that popup appears (maybe due to parsing etc.), so you don't see it. Assuming you are now in command mode, the escape press was actually consumed by the popup. Then of course you do escape to command, and try to undo, but it undo's a lot more than the chars you now accidentally sprayed in the code (also not exactly the same behaviour as Vim, but alas :D)

Fix

Right mouse click -> Remove Escape:

Go to Plug-ins -> IdeaVIM ->

Find the row with all the keybindings on it.. right click on it -> Add Keyboard Shortcut

Hit escape, save that. -> Apply -> Ok.

Annnnnd you're done!

Blog Comments (7)

Ray Burgemeestre

2013-06-30 15:51:11

For me:

* Set keymap to Visual studio
* search for "Find usages", map it to ALT+SHIFT+F
* search for "Rename", map it to ALT+SHIFT+R
* "Navigate to Declaration" should already be mapped to F12
* Also map class Hierarchy to ALT+SHIFT+H
* Set all code styles to use Tabs, of width 4. (Both tab size and indent)
* Set Show whitespaces (Editor - Appearance) to checked.
* Set Show linenumbers also to checked.
* Set Use block caret also to checked.

Ray Burgemeestre

2013-06-30 15:53:42

* Install Ideavim plugin
* Install Remote call plugin

jdewit

2013-08-20 18:01:46

Works. Thanks!

WensonSmith

website: www.seekbetter.me @

2013-09-06 04:33:39

Great!

This question was annoying me for a long while too!

Thanks a lot!

Nicholas Sterling

website: http://nicholassterling.wordpress.com/ @

2013-10-25 03:48:12

Awesome -- thanks for sharing this!

John Florian

2013-11-04 17:13:21

Don't get confused like I did on the 2nd step. I'm using PyCharm 3.0.1 and like the pic above, my config dialog gets quite messy with so many key bindings on one entry. For sure, you don't want to right-click on the row above nor the one below but the one *behind* all those keystroke labels. It might be easiest if you click the row above, then move cursor down one row. You'll then see the whole row get highlighted this way and you then can click anywhere on that highlighting (but not the keystroke labels themselves) to bring up the context menu where you can add the Escape binding.

That all said, I'm very hopeful this resolves the issue for me. I don't even think about what mode I'm in; it's so habitual for me to stay in command-mode as much as possible as that's where the power of vi/vim resides. This has been causing no end of grief.

Kepi

website: http://kepi.cz/ @

2013-11-10 13:21:23

Thanks a lot!


Leave a Reply

Comment may not be visible immediately, because I process everything manually.**

**) I plan to automate this.., but it's on my ToDo since for ever..


Author:
Ray Burgemeestre
february 23th, 1984

Topics:
C++, Linux, Webdev

Other interests:
Music, Art, Zen