Newsgroups: comp.editors Path: utzoo!sq!lee From: lee@sq.sq.com (Liam R. E. Quin) Subject: Re: Word completion in vi Message-ID: <1990Oct12.180150.14363@sq.sq.com> Keywords: vi, ~ Organization: SoftQuad Inc. References: <5951@minyos.xx.rmit.oz> <1990Oct6.022340.3588@hybrid.UUCP> Distribution: comp Date: Fri, 12 Oct 90 18:01:50 GMT Lines: 16 javey@hybrid.UUCP (shahram javey) writes: >How can the case of a word be changed [...] ? Here is a macro that will do that. Not as elegant as it could be, but... This goes from upper to lower case. To go the other way, you need to use \L instead of \U, or, if on a sun with broken \L, use \l and put a g just after the last z. :map! ^B ^V^V ^V^[bywPbi:s/!\(^V^[els\)/\U\1/!^V^[F:"zd3f/@z^V^M " Above line makes ^B turn the last word you typed into uppercase [lee@sq] " Lee -- Liam R. E. Quin, lee@sq.com, SoftQuad Inc., Toronto, +1 (416) 963-8337