I've made a bit of progress in writing a MediaWiki bundle, the goal
of which would be to allow one to use TextMate as an external editor
on Wikipedia and other sites using the MediaWiki software. I've
written an alpha version of a Ruby library to machine-read/screen-
scrape wiki pages -- for example:
page = new MediaWiki::Page('TextMate')
page.contents.gsub!(/Textmate/, 'TextMate')
page.save('Corrected capitalization')
I've also built a few proof-of-concept TextMate commands -- fetch
selection from Wikipedia, etc., and have done a very small amount of
work on a MediaWiki syntax grammar (though the one described here
<http://lists.macromates.com/pipermail/textmate/2006-January/
007623.html> might be further along).
In short, I'm trying to replicate as much as possible of the
functionality of mwjed <http://www.djini.de/software/mwjed/>, a jEdit
plugin with the same purpose. This would include being able to
configure multiple wikis independently, log in, etc., so the bundle
will have to keep track of a bit of configuration info.
If anyone is interested in contributing to this project in any way,
or has any ideas on how I can more elegantly keep track of a wiki
"instance" across individual pages, please let me know. I'm decent
enough in Ruby to get by (though my code could definitely benefit
from another pair of eyes), but if you've got specific expertise in
Objective-C I'd love your assistance in writing some dialogs like the
ones in the Subversion bundle.
The bundle is in no way ready for inclusion in the bundle repository,
but I can share what I've got with anyone who's interested. I invite
questions, comments, and general ridicule.
Cheers,
Andrew Dupont
http://andrewdupont.net
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.