News for hackers. Stuff that matters.
Re:Ask HN: Rate my Vim Script: snipMate.vim by mileszs on Thursday February 12, 2009 @02:46PM (#478873)
Unfortunately, it seems to clash loudly with one of the Ruby or Rails plugins I use (most likely rails.vim, and its RAbbrevs). Being admittedly fairly ignorant when it comes to vimscript, as well as being impatient, I removed snipMate for now. If you have a quick solution for such woes, I'd love to try it.

I'd be willing to maintain a fork on GitHub that avoids clashing with rails.vim (or whatever the issue is), if we can figure it out. Maybe I'll actually properly learn vimscript as a result.

Re:Ask HN: Rate my Vim Script: snipMate.vim by meese_ on Friday February 13, 2009 @10:04PM (#480786)
I think I've fixed this, can you try the latest release and see if you encounter the same problems?
Re:Ask HN: Rate my Vim Script: snipMate.vim by mileszs on Friday February 20, 2009 @10:07AM (#488722)
Yes, this seems to be fixed. Thanks!

I can't yet report on how useful it is, because I haven't used it for more than 60 seconds yet, but it looks good. I'm looking forward to using it.

Re:Ask HN: Rate my Vim Script: snipMate.vim by aditya on Thursday February 12, 2009 @03:02PM (#478898)
I'm sorry, how is this different from just having an abbreviation using iab?
Re:Ask HN: Rate my Vim Script: snipMate.vim by Harkins on Thursday February 12, 2009 @04:07PM (#478986)
Abbreviations expand into a single output. TextMate Snippets expand that output and then make it trivial to move between the parts you'll want to customize.

So a 'for' abbreviation would output: for (;;) { } and leave the cursor after the }.

A 'for' snippet would output the same thing, but you could bounce on the tab key to move between the three parameters to for, the body of the loop, and the line after the loop.

Re:Ask HN: Rate my Vim Script: snipMate.vim by etal on Thursday February 12, 2009 @09:40PM (#479333)
vim-latexsuite does something similar for creating environments. The default is Ctrl-J for jumping to the next section that needs to be filled in. The procedure takes some getting used to; I didn't like it at first.
Re:Ask HN: Rate my Vim Script: snipMate.vim by kurczak on Wednesday April 08, 2009 @07:23AM (#552547)
Can't get it to work. Using gvim on winxp. Directories are okay, nocompatibile is enabled, using expandtab + softtabstop=4 - but the only thing I get after pressing <tab> after one of the snippet keywords is a single space.
Re:Ask HN: Rate my Vim Script: snipMate.vim by tdavis on Thursday February 12, 2009 @07:25PM (#479228)
Other than being unable to get the html snippets to work, I like it and will be trying it as a SnippetsEMU replacement (if I can get html files working).
Re:Ask HN: Rate my Vim Script: snipMate.vim by nadim on Thursday February 12, 2009 @01:13PM (#478735)
How does this compare to snippetsEmu.vim?
Re:Ask HN: Rate my Vim Script: snipMate.vim by meese_ on Thursday February 12, 2009 @01:48PM (#478796)
The features listed on that page are not, to my knowledge, supported on snippetsEmu.vim:

"- The syntax of snippets is very similar to TextMate's, allowing easy conversion.

- The position of the snippet is kept transparently (i.e. it does not use marks/placeholders inserted in the buffer), which allows you to escape out of an incomplete snippet, something particularly useful in Vim.

- Variables in snippets are updated as-you-type

- Snippets can have multiple matches

- Snippets can be out of order. For instance, in a do...while loop, the condition can be added before the code."

There are also more snippets for more filetypes enabled by default with snipMate.vim, partly because of the features it supports. I also managed to get it to around half the code, which pleases me but I doubt anyone else would consider it a 'feature' ;)

Re:Ask HN: Rate my Vim Script: snipMate.vim by Harkins on Thursday February 12, 2009 @01:37PM (#478783)
Re:Ask HN: Rate my Vim Script: snipMate.vim by jonasb on Thursday February 12, 2009 @06:38PM (#479178)
I've given it a spin, and must say that I like it a lot. Thanks a lot meese_!