Skip to content

Instantly share code, notes, and snippets.

@dinjas
Created July 26, 2016 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dinjas/cdf3a6c13cbebe52ba84d5fb0cedb80b to your computer and use it in GitHub Desktop.
Save dinjas/cdf3a6c13cbebe52ba84d5fb0cedb80b to your computer and use it in GitHub Desktop.
How to copy lines matching pattern in vim
qaq # clear register A
:g/pattern/y A # copy lines matching pattern to register A
:let @+ = @a # copy register A to clipboard
@Victor-IT
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment