From owner-freebsd-current@FreeBSD.ORG Sun Mar 2 18:45:19 2014 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8F5A518; Sun, 2 Mar 2014 18:45:19 +0000 (UTC) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A878E1BF3; Sun, 2 Mar 2014 18:45:19 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s22Ij33e000373; Sun, 2 Mar 2014 10:45:07 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201403021845.s22Ij33e000373@gw.catspoiler.org> Date: Sun, 2 Mar 2014 10:45:03 -0800 (PST) From: Don Lewis Subject: Re: nvi: can't be used in the context of substitute To: lichray@gmail.com In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: freebsd-current@FreeBSD.org, d@delphij.net, peter@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 18:45:19 -0000 On 2 Mar, Zhihao Yuan wrote: > On Sun, Mar 2, 2014 at 6:04 AM, Xin Li wrote: >> It looks like the new nvi version don't accept in the context of >> substitute. A minimal use case would be to replace all leading 8 >> spaces with tabs, what one would do on older version of nvi would be: >> >> : 1,$ s/^ //g >> >> Now, with nvi in FreeBSD 10.x+, entering won't yield the >> character. This seems to be a regression from older nvi version. >> >> Is this a known issue, or did I missed something? > > The key in last line mode is now mapped to the filename > completion by default. The feature itself exisits in old nvi, but was > off by default. Currently, to input in last line, you can either > > > > which performs escape, or > > :se filec= > > The completion code is not as smart as that in vim, which > can detect the context. I think at least I should limit the > completion to the commands which need a filename, like > next, cd, edit, script, source, read. Thanks. I've been meaning to whine about this for a while. I just dropped :se filec= in ~/.nexrc and I'm happy again.