Copy Multiple words VIM Command
How to use Copy Multiple words Command in Linux VIM editor?
Explanation
y<count>w stands for Yank Multiple words
This command is used to copy the N number of words along with the current word to clipboard. The words can be pasted where ever necessary.
Usage:
y<count>w
Example:
- Open the file test.txt using the command
$ vim test.txt
- We can notice the text in the file.
Hiox India
Vim Tutorial
- Let us see how to copy multiple words from the file.
- Move the cursor to the word 'India'
- To copy 2 words to clipboard
Press y2w
- Using put command we can paste the copied content
Press p
- The copied content will be pasted