From http://learnvimscriptthehardway.stevelosh.com/chapters/38.html