I'm using TextMate 1.5 (906), and just starting to get involved with a couple of Python projects. I watched the Python screencast by Domenico Carbotta .. quite nice!
But there are a few snippets missing, I think. I'd like to use for<tab> to build a for-loop template. Ditto for all the controls like if, ifelse, while, and possibly a few others.
Are these in the Subversion repository? I tried to download the entire bundle set from svn using the instructions on: http://macromates.com/wiki/Main/SubversionCheckout but it had an error.
So basically I'm looking for a bit more python help in TM but not sure how to proceed.
Thanks!
-- Owen
Owen Densmore http://backspaces.net - http://redfish.com - http://friam.org
Il giorno 05/mar/06, alle ore 21:39, Owen Densmore ha scritto:
Are these in the Subversion repository? I tried to download the entire bundle set from svn using the instructions on: http://macromates.com/wiki/Main/SubversionCheckout but it had an error.
probably you should've set UTF-8 as the text encoding. if you've already done it, paste the error message so that we can help you :)
the rationale for not providing "for", "if" and such snippets is that they're not _that_ useful in speeding code writing. I don't use the "def" snippet either... :) the "class" snippet is useful mainly because of the smart-constructor feature.
ciao,
Domenico
the rationale for not providing "for", "if" and such snippets is that they're not _that_ useful in speeding code writing. I don't use the "def" snippet either... :) the "class" snippet is useful mainly because of the smart- constructor feature.
Somehow off topic, but first of all .. that class smart-constructor feature is sweet.
I took one wild and uneducated stab at doing something like that for a java snippet ... specifically for a javadoc snippet ...
like as you put the @param varName ..blah ... it'll drop the var into the method signature ... or the other way around.
... I was editing some code in TextMate cuz the eclipse text handling is kind of weak (though, the IDE itself is pretty handy) ... I thought it'd be pretty cool to do that, but it was wasting enough of my time that I myself actually realized I was trying to procrastinate and not do *real* work so I had to stop.
Anyway ... I'm just saying that'd be a pretty nifty snippet. :-)
-steve
like as you put the @param varName ..blah ... it'll drop the var into the method signature ... or the other way around.
I think the other way around should be much easier... but the regex gets fairly huge soon. I'm letting other regex gurus step in and have a stab at the problem, my attempt has become a huge mess after like 30 seconds :)