Jes.sTelford

TextMate-like snippets in Vim with SnipMate

November 11, 2011

codingproductivitysnipmatesnippetsvim

Using snippets to save on development time is always one of those “I’ll do it soon” tasks that I see everyone else doing but never get around to myself. I took the plunge. You should too. Here are simple to follow instructions to install SnipMate in Vim. The snippets use a TextMate Snippets-like syntax, so there’s a wealth of snippets out there and you can start creating your own straight away! Go;

  1. Follow the instructions for using VAM to install SnipMate;

    1. Install VAM.
    2. Edit your ~/.vimrc file; $ vim ~/.vimrc, and change the line

      call vam#ActivateAddons(\["github:YourName"\],{'auto_install' : 0})

      to

      call vam#ActivateAddons(\["snipMate"\],{'auto_install' : 0})

      Note that the capitalization of “snipMate” is important.

    3. Close and restart Vim
    4. Select “Y” to install snipMate
    5. Select “Y” twice more when prompted to install the two dependencies
  2. You’re done installing SnipMate - easy, huh?

Now, watch a screencast explaining it. Enjoy :)


Jess Telford

Jess Telford
🛠 @ceteio: Tools for organizing local structured meetups
🎤 Host @CodeHeartDesign & @ReactSydney
🗓 Ex: FE Arch Domain/Groupon/Yahoo7