p VIM Command

How to use p Command in Linux VIM editor?

Explanation


p stands for put
This command is used to paste a copied text into the file.

Usage:

p

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 and paste the second line from the file.
  • To copy the second line to clipboard
    Press yy
  • Using put command we can paste the copied content
    Press p
  • The copied content will be pasted
    Put (p) Vim Command

Ask Questions

Ask Question