Skip to content

Instantly share code, notes, and snippets.

@orlp
Last active August 29, 2015 14:25
Show Gist options
  • Save orlp/0d92506d549ffe09ed6e to your computer and use it in GitHub Desktop.
Save orlp/0d92506d549ffe09ed6e to your computer and use it in GitHub Desktop.

Enter Vim clean-sheet (vim -u NONE) and write the following text:

a a
a
a

Go to the beginning of the file, search for a, go back to the first result and do a search/replace with a*, repeating it once:

gg*Ncgna*<Esc>.

Mysteriously, a line gets deleted and we end up with:

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