On 2014-08-02 10:28, Saad Malik wrote:
> Hi All,
> This is a ViM ninja question. What is the most efficient way of
> duplicating a line without overwriting the unnamed register?

I tend to use

 :t.

to copy the current line to the line below it without messing up my
scratch register.  You can specify other destinations if you prefer:

 :t$          " copy this line to the end of the file
 :t0          " copy this line to the beginning of the file
 :t+3         " copy this line to 3 lines below
 :t/pattern/  " copy this line after the next line containing "pattern"
 :t/pattern/-3 " copy to 3 lines before the next match of "pattern"

-tim


-- 
-- 
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 because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to