If you are looking for ways to copy all text from Vim (vi) editor to your clipboard then you can follow the below steps.
- Open the file in the vim (vi) editor.
- Now enter visual mode by pressing Shift + v (you will see -- VISUAL -- at the bottom)
- Select all the text on the page and press y. You will see a message "x lines yanked".
- Note press colon ":" and type %!pbcopy. This will copy the entire text to the clipboard.

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!