I found a command to select all text in Vi/Vim file.


Could someone explain the line, please?


What does this vim cmd mean?

  • : switches into Command-Line mode
  • % has a special meaning—it stands for all the lines in the current file
  • y yank command (copy operation)
  • + the clipboard


:%y+ means switch into command line mode, select all the text, copy it, and place the copy on the clipboard

Further reading

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.