y VIM Command

How to use y Command in Linux VIM editor?


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.




  • 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
    Yank (y) Vim Command

Ask Questions

Ask Question