Support repo for 2012-11-12 Boston Vim meetup
Ruby Vim script
Pull request Compare This branch is 4 commits behind christoomey:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Vim Kata Meetup

This repo is the supporting content for a Boston Vim meetup held on November 12th, 2012.

The process is pretty simple. Each folder is a single exercise and contains two files; the berfore file and after file. The suggested approach is:

  1. Open Vim with an even vertical split berfore file on left, after file on right.
  2. Hack on the berfore file until it matches the after file.
  3. Try again using a different bit of vim functionality?
  4. ...
  5. Profit!

Each of the problems can be approached using a number of different Vim features, and as in life there is rarely a single correct answer. Feel free to experiment and try more than one technique to solve a problem. Have a solid handle on search and replace? Try macros. Already mastered macros? Try the global command.


Vimdiff (:diffthis command in both buffers) can be a great help to understand the problem. The following maps can help with activating vimdiff mode. To enable diff mode just use the <leader>dt map in both buffers. To disable, use the <leader>do map in either buffer.

nmap <leader>dt :diffthis<cr>
nmap <leader>do :diffoff<cr>

These maps have also been provided in a file named "diff_maps.vim" in the root of this repo for easy sourcing. Simply :source diff_maps.vim<cr> and you're set.

References & Support

Some sources that make for excellent deliberate Vim practice tools:

  • Vimgolf - Vim exercises with before and after text. Goal is to define the shortest sequence of Vim keystrokes that will change the before into the after.
  • RubyQuiz - An archive of a weekly coding challenging implimented in Ruby. Still great for practice
  • ProjectEuler - A math / logic focused programming challenge site. These ones get very tough very quick.
  • General Code Katas - Collection of general code katas from the Pragmatic Programmers.
  • VimKata - A Vim plugin based kata that has a sequence of increasingly advanced Vim exercises.
  • Gary Bernhardt String Calculator Kata - A short video of Gary Bernhardt performing a string calculator kata using TDD in Vim. Very impressive.