Saturday, September 11, 2010

Re: How to copy the name of the variable / function under the cursor?

>   "+yiw

Why not directly yiw ?
It will copy the word (or other text object) to the
"0
buffer which is the latest yanked text and is not affected by
deletions (which are assigned to buffers from 1 to 9).
As stated, to take a look at your register, just digit
:reg<CR>
To select a register to paste just digit
"np
where n is the buffer number to select.
Tip: if you don't want to take a look at register, just digit
"1p
and if is not what you are looking for, just press
u
to undo and
.
to repeat the latest command and (drum roll) Vim will automatically
increment the number of the buffer to paste!
Repeat until you find what you were looking for. :)

--
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:

Post a Comment