Slippery Snippets
Friday, August 25, 2006
  Sneek Peek I'm working on some bundles for an upcoming release and I'm starting to use a lot commands within tags.

Here's an example of something in the Python Bundle:

pf expands to:

print "<{s}>" % <{s:ArgList(Count(@z, '%[^%]'))}>

You'll then get an argument list which varies in length depending on the number of placeholders in your print string.

A print string of "The quick, %s %s jumped over %d benches"
will expand to:

print "The quick, %s %s jumped over %d benches" % (<{}>, <{}>, <{}>,)

(Well not really, as the cursor will be sitting on the first empty tag but you get the idea).

The only problem with commands is that they can take up a lot of space but a good choice of function name can help. 
Comments: 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]