yw VIM Command
How to use yw Command in Linux VIM editor?
Explanation
yw stands for Yank a word
This command is used to copy the current word from the file to clipboard. A particular word can be pasted where ever necessary.
Usage:
yw
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 the word 'India'
- Move the cursor to the word 'India'
- To copy the word to clipboard
Press yw
- Using put command we can paste the copied content
Press p
- The copied content will be pasted