Main image
22nd August
2009
written by Nick Anderson

Have you ever started writing a one-liner and half way in realized it was a bit more complex than you first thought?

If your shell is bash, next time that happens try ctrl-x ctrl-e.

It will take your current line and stuff it into the your default editor (export EDITOR=vim).

5 Comments

  1. xyz Linux Firefox 3.0.1
    22/08/2009

    It seems that it depends on the shell. Works in bash, but not in zsh.

  2. 22/08/2009

    Thanks, I didn’t think to specify I use the bash shell.

  3. Legooolas Linux Firefox 3.5.2
    24/08/2009

    If you’re using vi-mode keybindings for your prompt, then hit escape to be in command mode and then v and it opens $EDITOR in the same way.

  4. 24/08/2009

    Thanks for that!

  5. Ben Windows XP Firefox 3.5.2
    02/09/2009

    Dear god man I’m trapped in emacs!

Leave a Reply

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha

BLOGROLL

ARCHIVE