A month on the command line, Day 5: The esc clause

| | Comments (4) |

The hardest thing for me in vi and Vim is going from insert mode to command mode via the esc key. It's so far away.

While vi is good about using the home row of keys to navigate while in command mode, going into that mode in the first place requires me to take my left-hand fingers off the keyboard to hit esc. Getting back to insert mode with a or i is extremely easy, but esc remains so far away.

I wonder if any enterprising geek type ever came up with an esc footswitch to make getting into command mode possible without the fingers leaving the home row?

I guess hitting the esc key is no worse than using the arrow keys or the mouse, so I'm goint to stop bitching for now and get these Vim-created files on the blog.

4 Comments

ABCCCC said:

One way to get around this is by using C-[, aka ctrl-[.

You could also use the function :map to remap keys in vim. A common remapping is to map ESC to that useless key to the left of the homerow, the capslock key.

I've found this thread quite useful when figuring out how to fix the esc key:
http://vim.sourceforge.net/tips/tip.php?tip_id=285

hth,

ABCC

dbr said:

I've used vim a lot and have never used Esc to go from insert to command mode, every shell/vim version I've used allows ^c (ctrl+c) to get out of insert mode - and since my most-left finger is always over ctrl/shift, and c is near-by it's far easier than using Esc.
The only time I ever had a problem with it is once using vim via netcat, forgetting that ^c would kill the local nc process and not be sent to vim..

Ctrl-C -- that's good. I've got esc on the brain.

I've been using so many editors over the past week -- joe and nano among them, but still, there's something about vi -- unlocking the secrets of moving around quickly and streamlining the editing process makes writing with a computer so much more than the usual word processing program and its glorified-typewriter way of dealing with text.

Jason said:

After a very bad early experience with Vi some years ago which discouraged me
from trying it again, I decided to learn it a few years back just to find out
what Vi lovers found so captivating.

I now like Vi (or rather, Vim) very much and use it quite often (e.g., for
editing this comment), even though I still turn to Emacs for more serious
writing.

Once you've used Vim for a few days you'll start to issue the commands
intuitively, without having to make an effort to remember them. That's when
working with Vi becomes efficient. There's a book on Vim available in PDF from
the Vim Web site that may be useful for a more detailed treatment, though much
of it has now found its way into the official manual.

Once you're used to editing in Vim and writing HTML, you can learn a little
LaTeX and run pdflatex to get a beautifully typeset PDF file, which can be
printed via lp (assuming that you have Cups configured). The Cups Web
interface works well with console-based browsers.

I well remember learning LaTeX and saying goodbye to word processors, and
that was in 1998. I've never regretted it.

Leave a comment

Tech Talk column

Steven Rosenberg's weekly Tech Talk column, which appears Saturdays in the Los Angeles Daily News, is now available on the Daily News Technology page.

About this blog

Comments are back: Comments have returned to Click, but due to the thousands of spam comments clogging up the system each day, commenters must now log in. To comment, either create a Movable Type account when prompted, or create and use a Typekey account. Movable Type, as configured on this blog, allows commenters to create a Movable Type account, verify it via e-mail and then sign in to comment. Other methods of verification are OpenID, Live Journal and Vox.




Steven Rosenberg aims to learn what he does not know. He writes about it here.



About this Entry

This page contains a single entry by Steven Rosenberg published on May 7, 2007 1:50 PM.

A month on the command line, Day 5: Vim and vigor was the previous entry in this blog.

A month on the command line, Day 5: I don't have a vi coffee mug is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Recent Comments

Jason on A month on the command line, Day 5: The esc clause: After a very bad early experience with Vi some years ago which discour ...

Steven Rosenberg on A month on the command line, Day 5: The esc clause: Ctrl-C -- that's good. I've got esc on the brain. I've been using so ...

dbr on A month on the command line, Day 5: The esc clause: I've used vim a lot and have never used Esc to go from insert to comma ...

ABCCCC on A month on the command line, Day 5: The esc clause: One way to get around this is by using C-[, aka ctrl-[. You could als ...

Powered by Movable Type 4.21-en

Advertisement

Other blogs

About The Run Defense in Inside USC with Scott Wolf
HS FOOT: Taft up 16-0 after three quarters in Daily News High School Spotlight
Halftime: Lakers 50, Suns 44 in Inside the Lakers
Elton Brand saga Part I in Inside the Clippers
Kings vs. Capitals in Inside the Kings