From owner-freebsd-questions@FreeBSD.ORG Tue Dec 23 01:57:39 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A6B116A4CE for ; Tue, 23 Dec 2003 01:57:39 -0800 (PST) Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3ED4B43D31 for ; Tue, 23 Dec 2003 01:57:38 -0800 (PST) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Tue, 23 Dec 2003 09:56:52 +0000 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 1AYjDw-0001CQ-00; Tue, 23 Dec 2003 09:53:08 +0000 Date: Tue, 23 Dec 2003 09:53:08 +0000 (GMT) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: zhangweiwu@realss.com In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Jan Grant cc: freebsd-questions@freebsd.org Subject: Re: use vi style in all line-edit environment X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2003 09:57:39 -0000 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.