Copy till Particular line VIM Command
How to use Copy till Particular line Command in Linux VIM editor?
y<count>G stands for Yank Group till particular line
This command is used to copy the text from the current line to the Nth line of the file. This current position may be before or after the Nth line.
- Open the file test.txt using the command
$ vim test.txt
- We can notice the text in the file.
- Let us see how to copy the text from first line to fourth line
- Move the cursor to the 'Hiox India'
- To copy the lines till fourth line to clipboard
- Using put command we can paste the copied content
- The copied content will be pasted