Today I Learned
Tidbits of (hopefully) useful information on technologies and tools related to software development.

How to Copy to Clipboard in Vim

August 02, 2021 - Vim

First, select the text you want to copy using visual or visual line mode. Afterwards, type the following:

"*y
  • " to select a register
  • * is a register that references the system clipboard
  • y to yank your selection into the specified register
Want to improve this post? Feel free to submit a pull request!

Learnings sourced by everyone who has taught me, either directly or indirectly. Thanks!

Visit my main site for more, and sometimes longer, content.