You're replying to a comment by argv.

argv Permalink
January 16, 2010, 22:11

one thing that is awkward about vi is having to reach for the esc to switch modes key, which nowadays is usually located in a corner of the keyboard

there's another way to switch. ctrl-[
this might be on the other side of your keyboard so it gives you a way to switch modes from the opposite side

also, hitting v to jump into your editor seems like a "annoyance" until you begin creating user-defined functions in your interactive shell. or maybe you like saving short scripts.

e.g. you are typing up a good one-liner and then you decide to make it a function and save it for later use. you add give it a name() and brackets { ;} and then hit v. :w name :q and you're done. this is the essence of quick and dirty.

you can load these functions on the fly in other one-liners too, using sed. like this:
commands | sed '1i\
. nameoffunction
' | sh
i don't use bash. i use a very basic bourne-like shell that's stripped of "features" but close to being POSIX compliant. but with vi mode, tabcomplete and functions it's more than enough. vi mode is a good thing. and there are alternatives to readline if you look around.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "rocket_38": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.