HOWTO Configure vi to be the Command Line Editor for bash
LINUX HOWTO
Configure vi to be the Command Line Editor for bash
Luis F. Guzmán
luis.guzman@att.net
Central Indiana Linux Users Group
www.cinlug.org
ABSTRACT
This document contains a procedure on how to configure
vi to be the default command line editor for the bash shell.
The procedure in this document was tested with
GNU bash, version 1.14.7(1),
but it will probably work with other versions as well.
INTRODUCTION
Running "set -o vi" from the .bash_profile file
used to be enough to configure vi as the default command line
editor for the bash shell. However, this does not work with
GNU bash, version 1.14.7(1). The procedure in this document
explains another configuration method, which works.
CONFIGURING VI AS THE COMMAND LINE EDITOR FOR BASH
Step 1:
Using a text editor, edit your .bash_profile file,
the one in your home directory, so that
it includes the following two lines:
INPUTRC=$HOME/.inputrc
export INPUTRC
Step 2:
Using a text editor, create a file called .inputrc
in your home directory. The file should contain the
following line:
set editing-mode vi
Step 3:
That is it! From now on, bash will start with vi as
its command line editor. Type "bash" to start
a new shell and test it.
SEE ALSO
bash(1)
Go to
Author's home page
This document is maintained by:
Luis F. Guzmán