Slippery Snippets
Thursday, July 13, 2006
  Documentation One often mentioned problem with the plugin is the documentation. 
It is sad to say that the documentation has changed in a similar style 
to the plugin itself. I've had to make numerous 'bug fixes' and the 
additional features are poorly described. Inspired by Panos's initial 
draft I've started to create a proper piece of help to include with the 
downloads. If I get time I'll finish it off this weekend. 

I'd also like to thank Panos for the lovely logo sported underneath the 
link on the right. He's knocked up a 'powered by' style image as well:  

Very nice.

Anyway: new docs are coming and I'm trying to gather together some examples for different languages as well. If you have any you'd like to share then post them in the comments. Mention what your start and end tags are as well. I'm tempted to remove the customability of start and end tags in order to make sharing easier. I was thinking of '<{' and '}>' as the new standard but let me know your thoughts on that as well. 
Comments:
For start and end tags I use @ myself, but I'll be happy to use whatever settles as 'official' :)


Scribes
, a gnome text editor, also implements in own idea of snippets, and uses ${anchor} to specify snippets.

I think we should should think if at some point it should be possible to trade snippets with other editors, may it be TextMate or Scribes. Though first we gotta settle on a unified open/close tags for our own snippet definitions.

Also I'd like it, if we could ditch:
Iabbr < buffer > mysnippet ...

and be able to do:
snippet mysnippet ...

Much cleaner and easier IMHO.


Also I like the 'Slippery Snippets' name, more than snippetsEmu, lemme know if we should have the logo etc changed ;)
 
I personally use the double angle open and close as delimiters («») and the section symbol (§) as a separator. These have the advantage of being fairly easy to enter in vim (^k<<, ^k>>, ^kSE) and not being in use by any programming languages. The disadvantage is when you're working with both utf-8 and latin-1 charsets, it looks quite ugly in one or the other. I'm currently using a bugfixed version of 0.3 that I sent you a few months ago.
 
Panos: I'd looked into using ${} as tags but I think it'll break certain languages. TextMate can get away with this as it removes its tags on insert and remembers where to jump to. As we leave ours in (removing them would require more magic leading to more breakage) we need to be more careful about cross-language compatibility. This is why the option exists for definined your own tags.

Karl: I've added the problem from your version to my test suite. There is still a similar issue with the current version. Two commands on the same line will get substituted but only it they're separated by 'some' whitespace. No whitespace works if the value is not changed. The next release will fix this now that I know about it. Thanks for the post.
 
Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives
July 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / March 2007 / April 2007 / May 2007 / July 2007 / September 2007 / February 2008 / June 2009 / December 2010 /


Powered by Blogger

Subscribe to
Posts [Atom]