Slippery Snippets
Friday, April 06, 2007
  Snippy 1.1 Released I've just posted version 1.1 on This is a big bug fix release which should have cleared up the majority of issues from the tracker. I've reverted the start and end tags to ASCII to avoid random unicode problems people were having; be sure to define your own tags in your vimrc if you want to change them.

The biggest change is that the plugin no longer assumes auto-indenting; or, more specifically, all snippets need to define their own indenting regardless of the setting. This was done as auto-indent decisions could be affected by the choice of start and end tags, as well as the tricks the plugin performs to position the cursor. I've updated some of the bundles but not all, so keep your eye on trunk for the latest updates or stay tuned to for the next release.

I've noticed some snippet bundles popping up around the web, so I'll see if I can gather those together as well. 
Any chance of making the new indent behavior optional? There are lots of combinations of auto indenting options that can do things you can't really specify manually, especially cindent. Using markers instead of inserting text to jump back to works fine for me, are there cases where it doesn't?

I think this is especially an issue when packaging and distributing snippets, or when using the same snippets on different projects with different indentation styles.

str1 = g_strdup_printf( "example %s %s",
arg1, arg2 ); // <- how to indent this line?
(my cindent settings would line the second line up with the opening paren)

something = stupidly_long_library_function(
"how should this be indented?"
); // <- and this

{ // <- indent this? half-indent?
if ( somecondition ) {
// snippet {{{
#ifdef WIN32 // <-- autoindent moves
#endif // these to the first col
// }}}

I could maybe use functions to make them behave the way I want but that is sort of ridiculous and makes them harder to share, and I'd have to make separate ones for various projects.
I'm getting this error on line 162 "mapping already exists for ^I"
Hi jmc,
I experienced same error with yours,
and fixed it by deleting a line "map < TAB > za" in my .vimrc

Check your .vimrc and try to remove some TAB mapping.
Post a Comment

Subscribe to Post Comments [Atom]

<< Home

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]