27234Re: [vim] how to repl. word under the cursor with foowordbar?
- Apr 2, 2002Charles E. Campbell wrote [020402 20:36]:
> Thus saith HALIM,SALMAN:That's exactly why I use yiw :-)
> > perhaps i'm missing something, but why mess up the yank
> > register by hitting yiw? why not just use 'b'? (is it
> > because the cursor might be at the first character of the
> > word?)
> That would be the major problem. Also, depending on options, a "b"
> taken with the cursor at the first column may or may not move to
> the preceding line, last word. One solution: use "lb" (move right
> one character, then back to beginning of word). This will fail if
> the word is a single character word on a line by itself. Seems
> the yiw trick works with all cases.
Of course, you can still use "xyiw if you don't use the x
register usually. That way, you don't kill a register you don't
Thomas Köhler Email: jean-luc@... | LCARS - Linux
<>< WWW: http://jeanluc-picard.de | for Computers
IRC: jeanluc | on All Real
PGP public key available from Homepage! | Starships
- << Previous post in topic Next post in topic >>