From owner-freebsd-current@FreeBSD.ORG Sun Mar 2 11:54:50 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F032D9E4; Sun, 2 Mar 2014 11:54:50 +0000 (UTC) Received: from mail-vc0-x22a.google.com (mail-vc0-x22a.google.com [IPv6:2607:f8b0:400c:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C17C18C0; Sun, 2 Mar 2014 11:54:50 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id hu8so2545903vcb.15 for ; Sun, 02 Mar 2014 03:54:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Oh7dGxu5NWEmUYWR6DZMLsJa/Fip9y9zZCuPlZXqcls=; b=KHfWmwiDkpA8FB7o3zmPH5IXR+GsSYFzxEX/kuKwCOviHjxUYwDyjDf06kLzLeuzB5 HqCGMGaaY4oILvEZcqRfnIfKjBY9658t93YI772U5X1SCB7KdY5G9uR5IcG/pkBjIzFC A3pzeimH6obIDURGhJlOnz5iJUisZCLq8ObrRmauybXzAHsO4tJEIFWA3lyfr4Lg9KfR KNlUljXzaXl5eU8onN11FXIxsVFUrM1qUlvlOHPZOgwxeH9e3xowJzgVwi4ZKifYpNpw 09XIiLYOqEzacQDbr5OM0flyN6jG5qeja/asaXjbvsQwN4R0qSZVJ/2/OH3D/ZAm2QgZ v6TA== MIME-Version: 1.0 X-Received: by 10.58.66.137 with SMTP id f9mr11874423vet.11.1393761289694; Sun, 02 Mar 2014 03:54:49 -0800 (PST) Received: by 10.220.86.65 with HTTP; Sun, 2 Mar 2014 03:54:49 -0800 (PST) In-Reply-To: <5313103A.7060207@delphij.net> References: <5313103A.7060207@delphij.net> Date: Sun, 2 Mar 2014 06:54:49 -0500 Message-ID: Subject: Re: nvi: can't be used in the context of substitute From: Zhihao Yuan To: Xin LI Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Current , Peter Wemm 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 11:54:51 -0000 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. I opened an issue for this: https://github.com/lichray/nvi2/issues/15 Thank you for reporting. -- Zhihao Yuan, ID lichray The best way to predict the future is to invent it. ___________________________________________________ 4BSD -- http://4bsd.biz/