2

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

:%y+

Could someone explain the line, please?

4

What does this vim cmd mean?

:%y+
  • : 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

So

:%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.