I spend a lot of time on OSX in Terminal running Bash on SSH.

Most of the time it's fine, but when writing commands I miss several "standard" text editor features:

  • undo typing (/redo)
  • cut highlighted text
  • drag/drop text with mouse
  • find replace (occasionally useful for large commands)

Is there another shell or a plug in that allows editing the current command with the UI of a "standard" text editor (i.e. with some of the features I miss listed above)?


2 Answers 2


In case anyone ever sees this, I've settled on Micro as my $EDITOR and use fc when I want to edit a command.

It has a really intuitive interace with undo/redo, cut/paste, and find/replace. Unfortunately I still cannot drag text and the UI is still not 100% as friendly as non-terminal text editors.


For bash, put:

-o vi

into your .bashrc file.

Or better yet, to affect input for all GNU programs, put:

set editing-mode vi

into your .inputrc file.

(Or use emacs instead of vi.)

The command line will then be in input mode by default, and entering <esc> will put it into vi editing mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.