-
-
Save jtuz/2e990699a54f0345cfd20ccd96859c8c to your computer and use it in GitHub Desktop.
How to copy lines matching pattern in vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qaq # clear register A | |
:g/pattern/y A # copy lines matching pattern to register A | |
:let @+ = @a # copy register A to clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment