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