Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I make my shell behave like vim? I've seen other developers do it but I never got it installed/set up on my machine.

Ubuntu 11.04

share|improve this question
up vote 8 down vote accepted

Put this in your ~/.bashrc:

set -o vi

Then you can edit your command line using vi keys/commands instead of emacs keys/commands.

share|improve this answer
    
................yes! – Ramy Oct 8 '12 at 19:31
    
And for zsh: bindkey -v – Heptite Oct 8 '12 at 19:43

I didn't have to edit my .bashrc. I just set this on the command line.

$ set -o vi

For more info with examples and a downloadable cheat sheet please see http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .