Answers for "vim duplicate line"

4

vim copy line below

y y then d d to delete p to paste
Posted by: Guest on November-05-2020
1

vim duplicate line

yy #copy complete line
p  #paste underneath or
P  #paste above
Posted by: Guest on June-14-2021
4

vim copy line

yy - Yank (copy) the current line, including the newline character.
3yy - Yank (copy) three lines, starting from the line where the cursor is positioned.
y$ - Yank (copy) everything from the cursor to the end of the line.
y^ - Yank (copy) everything from the cursor to the start of the line.
yw - Yank (copy) to the start of the next word.
yiw – Yank (copy) the current word.
y% - Yank (copy) to the matching character. By default supported pairs are (), {}, and []. Useful to copy text between matching brackets.
Posted by: Guest on December-05-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language