Date: Sun, 2 Mar 2014 06:54:49 -0500 From: Zhihao Yuan <lichray@gmail.com> To: Xin LI <d@delphij.net> Cc: FreeBSD Current <freebsd-current@freebsd.org>, Peter Wemm <peter@freebsd.org> Subject: Re: nvi: <tab> can't be used in the context of substitute Message-ID: <CAGsORuAKxsaDFqjiTjSQM3Rxa23fBX8LAzBShhHYbB86S%2Bbgnw@mail.gmail.com> In-Reply-To: <5313103A.7060207@delphij.net> References: <5313103A.7060207@delphij.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 2, 2014 at 6:04 AM, Xin Li <delphij@delphij.net> wrote: > It looks like the new nvi version don't accept <tab> 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/^ /<tab>/g > > Now, with nvi in FreeBSD 10.x+, entering <tab> won't yield the <tab> > character. This seems to be a regression from older nvi version. > > Is this a known issue, or did I missed something? The <tab> 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 <tab> in last line, you can either <C-v><C-v><tab> which performs escape, or :se filec=<some other key, or empty to disable completion> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGsORuAKxsaDFqjiTjSQM3Rxa23fBX8LAzBShhHYbB86S%2Bbgnw>