суббота, 2 января 2010 г.

edit bash command in vim

Last Command

Hitting "fc" from a Bash shell invokes your default editor (hopefully Vim) on your last shell command and executes it after Vim exits. This is great for command-line history editing after the fact.

-e ENAME selects which editor to use. Default is FCEDIT, then EDITOR, then vi.

You can also edit the *current* command using CTRL-xCTRL-e (in, ahem emacs mode).
Handy if your oneliner becomes unmanageable.
You can the function "edit-and-execute-command" to your fave keypresses in "~/.inputrc".

Комментариев нет:

Отправить комментарий