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
>> In the regular find window, there's that arrow button you can click
>> to get a multi line text field where to enter your search query,
>> but I don't see it when I do a search in whole project, which is
>> kind of a pain when looking for lengthy pieces of code...
>
> Do you know command-E? It places the selection on the find clipboard.
> 99% of the time, I want to find something which is already in my
> source, and never actually type it in the find dialog text fields
Thanks for the tip. But the situation I'm often confronted to in my
job is editing whole sites coded by others that have the same exact
HTML on millions of pages and I really need to use the project wide
search and replace feature in order to be anywhere close to
productive... If there's is any chance to implement the same collapse
window thinggy from the regular search in the future, it would be
great. Thanks again for your help.
I didn't know about command + / till the other day, however i've run
into a minor issue.
If I have source like the following:
function do_me()
{
/* this was some old shit */
/*
$var = blah
*/
echo 'hello';
}
the command + / shortcut will turn it into:
/*function do_me()
{
/* this was some old shit */
/*
$var = blah
*/
echo 'hello';
}*/
which is deffinitly a no go. how could I change it so that it would
result in:
// function do_me()
// {
// /* this was some old shit */
// /*
// $var = blah
// */
//
// echo 'hello';
// }
Thanks,
Eric Coleman
I am (almost done) writing an HTML output script for my Lua bundle
which (among other things) provides TextMate links for syntax error
codes.
I put one of my files in a path with a space in the name, and it took
me a fair amount of experimenting to figure out how TextMate and Lua
independently wanted to see the URL.
The raw path as supplied in the argument list is:
/Users/gavinkistner/Desktop/pork butt/bling/tmp.lua
To pass that to Lua, I needed to escape the space char:
file_path = Pathname.new( ARGV[0].gsub( %r{([^\w/.])}, '\\\\\1' ) )
#=> /Users/gavinkistner/Desktop/pork\ butt/bling/tmp.lua
To create the parameter for the TextMate URL, I needed to NOT have
that escaping. If I perform HTML escaping (for valid HTML) the space
may not be represented as a '+' char, but must be a %20.
WORK:
<a href='txmt://open?url=file:///Users/gavinkistner/Desktop/pork butt/
orxit.lua&line=6'>
<a href='txmt://open?url=file%3A%2F%2F%2FUsers%2Fgavinkistner%
2FDesktop%2Fpork%20butt%2Forxit.lua&line=6'>
DON'T WORK:
<a href='txmt://open?url=file:///Users/gavinkistner/Desktop/pork\
butt/orxit.lua&line=6'>
<a href='txmt://open?url=file%3A%2F%2F%2FUsers%2Fgavinkistner%
2FDesktop%2Fpork+butt%2Forxit.lua&line=6'>
The Ruby code to create the valid URL param:
htmlpath = CGI.escape( "file://" + File.expand_path( path+file,
file_dir ).gsub( /\\(.)/, '\\1' ) ).gsub('+','%20')
As a more pathological case, I renamed the folder in Finder to "pork
\ % / butt"
The "/" in the name is apparently a ":" on the file system:
gavinkistner$ cd pork\ \\\ %\ \:\ butt/
gavinkistner$ pwd
/Users/gavinkistner/Desktop/pork \ % : butt
My code produces:
<a href='txmt://open?url=file%3A%2F%2F%2FUsers%2Fgavinkistner%
2FDesktop%2Fpork%20%5C%20%25%20%3A%20butt%2Forxit.lua&line=6'>
and it works. Yay! :)
In the regular find window, there's that arrow button you can click
to get a multi line text field where to enter your search query, but
I don't see it when I do a search in whole project, which is kind of
a pain when looking for lengthy pieces of code...
Did I miss something? Thanks!
Hello there
I just noticed that the new Mercurial bundle uses cmd-H to activate
its commands. I use this shortcut very often for hiding Textmate and
other applications. It's a system wide shortcut for hiding
applications. So I might not be the only one doing this. It's no big
problem for me since I can always disable the bundle with the filter.
All the same it might be a good idea to change it to anoter shortcut.
Cheers. Oliver
>I don't know if you use Growl but it's pretty versatile. You can
>choose the place where it pops up, the type of notif. (even speech or
>mail - not that useful for TM), the icon, how long it stays, etc. on
>per command basis (even over a network). So it can be used for notif.
>of background tasks as well for "instant feedback on the command
>executed".
Allan
I think you use this discussion list as a user feedback collection
point. In which case, FWIW, I would be very glad for Growl support too
for the reasons stated above. Growl is highly configurable, usable in a
persistent, immediate and coalesced modes and very OS X. I find
tooltips fiddly and non-persistent. I use most text at 14 points and I
find tooltips bothersome to read.
cheers
David.
Hi,
Is there any way to replace tool tip output with Growl[1] for the svn
bundle?
Tool tips are the only "non-sticky" output, but they are so non-
sticky that I sometimes cant read them at all. If the cursor is not
at the right place (99% of the time as I use a tablet pen), this is a
real nightmare.
I can't find a way to catch the output of the command, if I could I'd
send it to Growl thru growlnotify (Shell) or Ruby-Growl.
So my questions are:
1) How can I catch the output of svn commands?
2) More generally, wouldn't it be nice to add Growl to the output
options? What do you think Allan?
For those who don't know it:
Growl is a central notification system for Mac OS X.
It's free and released under BSD license.
What is nice is that you can configure how notifications will look,
if they are sticky, etc. per applications. Applications can access it
through Cocoa and Carbon API or Applescript, Ruby, Perl, Java, TCL,
Python, Shell, etc.
Here are some scrennshots[2] and the huge list of apps using Growl[3]
[1]: http://growl.info/
[2]: http://growl.info/screenshots.php
[3]: http://growl.info/applications.php
--
FredB