Skip to main content

Vim: snippetsEmu


Just this morning, one of my buddies was ragging on me that TextMate was cool because of snippet expansion. I personally think this is optimizing the wrong thing since the typing part of programming is the easy part. Nonetheless, I'm happy to see that Vim has a knockoff. Best of all, it's easy to use and pretty useful.

You can get the plugin here. Once you install it per the instructions, you can open up a Python file, insert the text "def", hit tab and get what's shown in the image. Hitting tab again jumps between the fields. Even better, there's a snippets file for Genshi.

Comments

Anonymous said…
Scribes also has this feature.

Flash Demo
> Scribes also has this feature.

Ok. I watched the demo.

I'm a huge Vim fan. I was waiting to see if there was something in Scribes that I'm missing in Vim. I don't really see anything significant that I'm missing, but there are tons of things that Vim has that I'm sure Scribes doesn't have.

Arguing that Scribes is simpler may be important to some people, but not me. Since I use a text editor almost all day long, productivity and power is king, and simplicity is barely relevant.

I'm still open minded to killer features that Vim doesn't have. Of course, knowing Vim, someone would just code up said features as a Vim plugin ;)
Bob said…
That looks like a feature that a Java programmer would like.

I can hear JJ now.... ooohhh :)