7

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

Sathyajith Bhat
  • 61,504
  • 38
  • 179
  • 264
Ramy
  • 1,111
  • 3
  • 18
  • 36

2 Answers2

12

Put this in your ~/.bashrc:

set -o vi

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

garyjohn
  • 34,610
  • 8
  • 97
  • 89
1

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/

dmasi
  • 132
  • 4