On 21.02.2011 20:14, Ben Fritz wrote:
On Feb 21, 10:41 am, David Kahn<[email protected]> wrote:
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've got a lot of great suggestions, let me add one more (which may
work depending on what you're trying to do):
1. align the commas in the lines you wish to replace:
word ,12)
word2,12)
word3,12)
How can one easily align the above three lines? I guess there must be
something like selecting a range and then tell vim what the character to
align at is.
Thanks Elias
--
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