Adding vim snippets

sameera207 picture sameera207 · Feb 19, 2013 · Viewed 9.7k times · Source

I have found this resource for Ruby/Rails snippets, seems like it has lots of cool snippets that I could use with vim.

But since I'm new to vim, I don't know how to enable those snippets to my vim editor. There is no instruction manual as such.

How can I get these kind of snippets enabled in the vim editor?

Answer

Ingo Karkat picture Ingo Karkat · Feb 19, 2013

Those snippets are for the snipMate - TextMate-style snippets for Vim plugin. You need to install it first.

Note that though this plugin isn't maintained any more, it's still working fine (and probably will continue to do so, due to Vim's great record of backwards compatibility), and is still used by many people (me included). There's a renewed fork available, though: garbas/vim-snipmate. A newer, more powerful plugin is UltiSnips - The ultimate snippet solution for python enabled Vim, which can convert the old snipMate snippets into its format. So, there's a lot of choice.