Saturday, September 11, 2010

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

On Sat, Sep 11, 2010 at 3:37 AM, caruso_g <peppecaruso@gmail.com> wrote:
>>   "+yiw

I'm sorry - I'm not understanding what you're doing here. Wouldn't 'i'
put you into insert mode and then there would be a 'w' character
that's pasted.
Whever I want to paste, I just use 'P'.
Thanks for the tip on the buffers - it looks quite useful.

Thanks,
Ven

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

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