Use shortcut to replace “Esc” in VIM/GVIM

I bought a second hand Canon 300D recently. Had much fun with it. I’ll probably write something about using a DSLR in Ubuntu. Really love this “old” camera.

OK. Here is the problem I recently found when I was using GVIM-latex-suite to type my final thesis, when I want to change back to normal mode from the insert mode by pressing “Esc” it is quite unconfortable. Although “Esc” key is not far from other keys, it is just not that convenient. Because when you typing, your fingers are alway around “ASDF”and “JKL:” keys. You’ll need to move your hand to reach the “Esc” key…

This can be quite easy to solve. I am sure there is a way using VIM setting itself to remap Esc key. But don’t want to research such settings. The KDE control center, can do this quite easily. Here is the steps:

  1. KDE control center-> Reginal & accessibility-> Input Actions.
  2. “New Action”. Note you’d better to create a new group first.
  3. Go to “Trigger” tab, “New”-> Shortcut Trigger-> I use “Right Alt +  L”. It’s quite convenient when you are in the type position. Try it yourself.
  4. Go to “Actions” tab, “New”-> Keyboard input -> type Escape.
  5. Leave all the other settings default.

That’s it. Now in every active windows, if you press “Right Alt+L” the actual key activated is “Esc” key. Enjoy your VIM typing!

About these ads

6 Responses to Use shortcut to replace “Esc” in VIM/GVIM

  1. kdrff says:

    Good site!!!

  2. SSN says:

    You can type CTRL-[ without any remapping too… :)

  3. Wei says:

    Thanks briliant. Thanks, SSN!

  4. Cellphones says:

    There are several cheap cellular phone on the ton
    for willpower place trades. In herbal, cheat contrary gloves
    to bond any exhibit that they improve.

  5. This is the perfect web site for anyone who hopes to find out about this topic.
    You know a whole lot its almost hard to argue
    with you (not that I really would want to…HaHa). You certainly put
    a fresh spin on a subject which has been discussed for many
    years. Wonderful stuff, just excellent!

  6. I am truly thankful to the owner of this site who has shared this enormous article at at this time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: