Skip to content

Instantly share code, notes, and snippets.

@adomokos
Last active December 18, 2015 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adomokos/5765605 to your computer and use it in GitHub Desktop.
Save adomokos/5765605 to your computer and use it in GitHub Desktop.
vim katas

The Yank Register

  1. Start at the first character of the first line collection = getCollection(); process(somethingInTheWay, target);
  2. Yank the word "collection" with - yiw
  3. Move to the beginning of the word "somethingInTheWay" with - jww
  4. Delete the word "somethingInTheWay" with - diw
  5. Paste from the Yank Register with - "0P
  6. Look at the Yank Register with - :reg "0

The Black Hole Register

  1. Use the same example as above: collection = getCollection(); process(somethingInTheWay, target);
  2. Yank the word "collection" with - yiw
  3. Move to the beginning of the word "somethingInTheWay" with - jww
  4. Delete the word "somethingInTheWay" into Black Hole Reg with - "_diw
  5. Paste from the Yank Register with - P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment