Re: Snippet names

From: Robert <ro....at.web.de>
Date: Wed, 3 Mar 2010 10:54:42 -0800 (PST)

> > > Rather than having a default of '' for word_chars, maybe it should be
> > > configurable? I was thinking of adding a SNIPPET_WORD_CHARS =
> > > 'abcdef..._:-' option to the top of lsnippets.lua, but that seems
> > > clunky. Any better ideas? Also, buffer:set_chars_default() might not
> > > be what chars may be set in a user's theme. You would have to restore
> > > the current set of word chars (though it appears to be '' when I try
> > > and textadept.print() it from the command entry rather than
> > > 'abcdef...'. Maybe I'm doing something wrong).
>
> > Maybe the simplest solution would be to have a space (or line
> > beginning) as the delimiter?
>
> I don't mean to be a pain, but some snippets like Ruby's "each" occurs
> after a '.', eg:
>
>   collection.each<tab>
>
> expands to
>
>   collection.each { |<tab stop>| <tab stop> }
>
> It's not a bad idea though. Maybe this is one of a tiny number of
> cases. I'm not sure.

You're right - probably there are such cases.
An alternative would be to use collection. each and let the snippet
move back one char, but that's obviously not so nice.

Robert
Received on Wed 03 Mar 2010 - 13:54:42 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:39:34 EST