use vi style in all line-edit environment

Jan Grant Jan.Grant at bristol.ac.uk
Tue Dec 23 01:57:39 PST 2003


On Tue, 23 Dec 2003, Zhang Weiwu wrote:

> I have been using vi all the time, even in csh I set bindkey -v to use vi
> style command-line edit.
>
> But when the context is switched to python, mysql, or scilab I have to warn
> myself not to type in vi style. Very often in mysql I mistyped something
> and try to type a "x" to correct it, or I press "A" and thought I would go
> to the end of the line.
>
> Is it possible to make a global configuration to let all command-line
> processor accept vi style key?

Most of the tools you're referring to use the GNU readline library. The
manpage (readline(3)) _claims_ that it offers a vi-style editing mode.
You'll have to suck it and see: try

	echo set editing-mode vi > ~/.inputrc

and check the man page for more information.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Solution: (n) a watered-down version of something neat.


More information about the freebsd-questions mailing list