bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get out of the vi editing mode


From: Chet Ramey
Subject: Re: how to get out of the vi editing mode
Date: Wed, 24 Jun 2009 08:31:17 -0400

> I hit something by accident and command line editing no longer works.
> (I think I switched to the vi mode).
> 1. how do I get back to the emacs mode? (aka what did I hit?!)

If you're really in vi mode, use set -o emacs.  If you're just in some
sub-mode, try ^G.

> 2. how do I disable vi mode forever and ever (short of recompiling bash 
> myself)?

You can't, really, without rebuilding.  (And I haven't tried building without
vi mode in a long time.)

The reason I asked whether or not you really were in vi mode is that bash
unbinds all of the key bindings that will take you from emacs mode to vi
mode and vice versa.  For instance, I get the following output when in
emacs mode:

$ bind -p | grep mode
# emacs-editing-mode (not bound)
# overwrite-mode (not bound)
# vi-append-mode (not bound)
# vi-editing-mode (not bound)
# vi-insertion-mode (not bound)
# vi-movement-mode (not bound)

and similar output when in vi mode.

Chet




-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://tiswww.tis.case.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]