Jeff Rose rosejn at
Wed Feb 15 07:24:24 EST 2006

I was just heckling Gavin with questions while trying to work the kinks
out of these snippets, but I should be posting to the list anyway...

First, I'm trying to get the indentation to work correctly.  Is there by
any chance a way to query for where the current line should be indented
to?  The language indenting stuff in vim has to know this, but I'm not
sure how to use it.  I guess I could even just do "==" on each line
before and after writing text, but I'm not sure if that is correct
either.  Any advice you have would be great.

Second, what do you think is the best way for selecting the active
snippet packages?  Currently it just uses the filetype variable, but
there is a package for rails, for example, which that won't work for.
Any pointers on making menus or easy to use picklists or something?
This is the kind of stuff that a good ruby binding for vim would have
included so we can throw together functional plugins without spending
time on boilerplate stuff...(Documentation could probably be automated
too.  Maybe an rdoc to vim documentation generator or something?)  I
tried to ask around about who is working on the binding and no one
responded, including the author.  If we were to work on the binding in
this project do you think they would accept additions and/or changes?

Last, do you have any ideas on a minimally intrusive way to tell the
user that their cursor is currently in place to run a snippet?  In
TextMate a little dot comes up at the bottom, which is nice because it
lets you learn about new snippets as you code.  (So you type
"foo.each[cursor-here]" and a star shows up in the status bar or
something, which tells you that if you hit tab a snippet will be produced.)

I second Thomas's suggestions as well.  Mauricio Fernandez folding and
block conversion scripts are great, and the others look helpful.  It
would be ideal if we could create a list of features, and then inside
vim select a feature from the list, hit enter, and then press the key
combination you want to bind to it.  Basically how it's done in video


More information about the vim-ruby-devel mailing list