Monday, February 21, 2011

Copy/delete/paste strategy?

Relatively new to vim. I know there are other ways to do this specific task such as search/replace but I want to understand how to repeatedly paste some text but also overwrite a certain character, in the case I want to do it manually. This has brought me to need to understand if there is a sort of clipboard/yank history.

For example, I have yanked this text:

  .truncate(

I want to replace the comma ',' in the lines below with my yanked text in each line:

  word,12)
  word2,12)
  word3,12)

So what I do is move in regular mode to the first comma and press 'x' to remove the comma, and then press 'p'... however instead of getting my yanked text, I get the text now under the cursor, in this case '1'. So how do I handle a yank > delete > put operation, and multiple times?



--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: