Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 660 Bytes

paste-word-under-cursor.md

File metadata and controls

38 lines (25 loc) · 660 Bytes

Replace word under cursor with copied contents

viwp when the cursor is on a word.

  1. v - enter visual mode
  2. iw - select "in" word
  3. p - put or paste copied contents

This is useful to replace a word with the copied contents.

  1. Copy a word
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
        ^
        |--- press yiw to yank/copy the word ipsum
  1. Paste the word
  Nunc quis leo vulputate.
         ^
         |--- place cursor here and press viwp
  1. The result should be
  Nunc ipsum leo vulputate.
         ^
         |--- The word quis should be replaced with the copied word ipsum