linux - vim: copy and paste text without looking into the line number -
For example, I want to copy line 5 ~ 15 and paste it to another location. I find several ways:
-  Move your cursor to row 5, then 11yy , andp
- Command: Select the block within
5,15 y andp
- Ctrl + V, row 5 ~ 15, then go to that location Where you want to paste, leave enough blank rows to paste (or it will overlap with the current text), and
pI'm not satisfied with any method Method 1 and 2, do not line me up The number will be counting or counting how many lines I want to copy, when the text is included in many lines, it becomes very difficult for method 3, I have to be able to have enough space ahead of me, which lines me It is also possible to count those that I want to paste. So is there any way that is like method 3, just before I do not have to leave enough space? 
 Edit: Method 2, the original 5,15 yy is incorrect <3p>There will be a way to do the same as your 3. -  Go to line-5, then V15Gy orV10jy orVjjj ... jy (V is towards visual mode line. You can see your selected line without boarding about the number of lines)Line-40 (or somewhere And) and p . It will line up the line after 40 -40 lines. Or useP to place it before the line-40or you can use the Ex-command : t (Like: copy but less): 5,15 T 40
 
 
- Command: Select the block within
Comments
Post a Comment