Loading ...
Sorry, an error occurred while loading the content.

27234Re: [vim] how to repl. word under the cursor with foowordbar?

Expand Messages
  • Thomas Köhler
    Apr 2, 2002
    • 0 Attachment
      Charles E. Campbell wrote [020402 20:36]:
      > Thus saith HALIM,SALMAN:
      > > 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.

      That's exactly why I use yiw :-)
      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
      want to...


      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
    • Show all 6 messages in this topic