Hi,
I just uploaded the new version 0.906 Download: http://email.eva.mpg.de/~bibiko/downloads/textmate/TMTools.tmplugin.zip Help: http://email.eva.mpg.de/~bibiko/downloads/textmate/tmtoolshelp.html or "$TMTOOLS" help me
Changes: added: show bundleMenu
##### Regarding to the Ctrl+Esc issue:
For all those of you who don't want to edit a keybindings.dict or to abandon to some 'global' Ctrl+Esc events, now you can easily create a normal TM command with
"$TMTOOLS" show bundleMenu
bound to any key-combo; input = none; output = show tool tip
to invoke the gear menu. Of course, Ctrl+Esc doesn't work if this combo is used by other applications.
If there is someone who really need the Ctrl+Esc combo to open the gear menu regardless of other applications, I believe this should work (if you have installed QuickSilver and TMTOOLS 0.906):
1) write a bash script with the following content:
_____________________________ #!/bin/bash ~/Library/Application\ Support/TextMate/PlugIns/TMTools.tmplugin/ Contents/Resources/tm_tools show bundleMenu
_____________________________ Note: please verify the path to tm_tools!
2) save it as - let's say -
~/TM_show_bundleMenu.sh
Note: be sure you set the "execute bit"!
3) open QuickSilver Trigger pane
4) go to 'Custom Triggers'
and add a new trigger by looking for the just created bash script name "TM_show_bundleMenu" for an item; action = "Run [...]"; and set the target to "dummy"
5) assign to the just created trigger the hot-key Ctrl+Esc and for activation 'On Press'; scope to "TextMate"
6) close the QuickSilver window
7) try the hot-key Ctrl+Esc in TM
I tried it out, and it works, even if I have Apple Remote running.
Cheers,
--Hans
So. Totally. Awesome.
I vote for Hans as the most insanely awesome TextMate hacker evar. Maybe even better than me ;)
—Thomas Aylott – subtleGradient—
On Nov 13, 2007, at 9:57 AM, Hans-Joerg Bibiko wrote:
If there is someone who really need the Ctrl+Esc combo to open the gear menu regardless of other applications, I believe this should work (if you have installed QuickSilver and TMTOOLS 0.906):
Hans-Joerg, this looks very interesting !! I am new to textmate and I want to improve Erlang Support, and I was wondering how to do exactly those things which TMTOOLS does (e.g.: remote control of caret)
I have on question. Can the Help also be accessed from within textmate or just normal via browser and URL you provided ?
regards
On Nov 13, 2007 1:47 PM, Thomas Aylott - subtleGradient textmate@subtlegradient.com wrote:
So. Totally. Awesome.
I vote for Hans as the most insanely awesome TextMate hacker evar. Maybe even better than me ;)
—Thomas Aylott – subtleGradient—
On Nov 13, 2007, at 9:57 AM, Hans-Joerg Bibiko wrote:
If there is someone who really need the Ctrl+Esc combo to open the gear menu regardless of other applications, I believe this should work (if you have installed QuickSilver and TMTOOLS 0.906):
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
"$TMTOOLS" help me
does pretty much what I was asking for, sorry for the noise ..
On Nov 13, 2007 3:05 PM, Roberto Saccon rsaccon@gmail.com wrote:
Hans-Joerg, this looks very interesting !! I am new to textmate and I want to improve Erlang Support, and I was wondering how to do exactly those things which TMTOOLS does (e.g.: remote control of caret)
I have on question. Can the Help also be accessed from within textmate or just normal via browser and URL you provided ?
regards
On Nov 13, 2007 1:47 PM, Thomas Aylott - subtleGradient
textmate@subtlegradient.com wrote:
So. Totally. Awesome.
I vote for Hans as the most insanely awesome TextMate hacker evar. Maybe even better than me ;)
—Thomas Aylott – subtleGradient—
On Nov 13, 2007, at 9:57 AM, Hans-Joerg Bibiko wrote:
If there is someone who really need the Ctrl+Esc combo to open the gear menu regardless of other applications, I believe this should work (if you have installed QuickSilver and TMTOOLS 0.906):
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- Roberto Saccon http://rsaccon.com
if I write a bundle which uses TMTOOLS, what is the recommended way, to satisfy the TMTOOLS dependency ?
Just instructions for the user to manually instlall it, or is there a smarter way ?
regards
On 13.11.2007, at 18:11, Roberto Saccon wrote:
if I write a bundle which uses TMTOOLS, what is the recommended way, to satisfy the TMTOOLS dependency ?
First, there are no dependencies.
Second, I don't know whether it is a good idea to use TMTOOLS in a bundle which is intended to be shared - in your case the Erlang Support. Of course, there would be a way to use the plug-in. I added the option '-v' to the release 0906. You can download it and have a look at the example in section Usage > version. (I didn't change the release number).
But actually this plug-in should be used for "private scripting" ONLY.
Allan wrote at http://blog.macromates.com/2007/hacking-textmate/:
"Hans-Jörg Bibiko decided he couldn’t wait for a real scripting API (i.e. allowing you to remote control TextMate) and wrote TMTOOLS, a shell command that works as a mini interpreter where the commands are all TextMate actions. [...] Disclaimer: [...] the above is all based on undocumented functionality or using things in ways they were not supposed to be used, i.e. end user innovation."
The TMTOOLS plug-in calls undocumented (hacked) TextMate functions without an appropriate API! Ok, I did my very best to make it safe and by myself I use it very often - and up to now I didn't recognise any bug - but I cannot predict possible side-effects because I don't have the chance to have a look at the source code. On the other hand I didn't install Leopard yet (I'll wait for 10.5.1 at least ;) and TM 2.0 will come. I don't know whether TMTOOLS will work in TM 2.0 because it depends FULLY on Allan's source code (because there is no API yet).
But if I understood Allan correctly in his posting '... he couldn’t wait for a real scripting API ...' Allan has plans to provide the user with a real API.
Thitherto I recommend to use TMTOOLS only for your OWN PRIVATE purposes.
Regarding to your Erlang enhancements: What do you want to improve by using TMTOOLS? Maybe, there are other ways.
Cheers,
--Hans
Hans-Jörg, thanks for our explanations.
Ok, I understand now that I should only use it for private purposes.
Regarding to your Erlang enhancements: What do you want to improve by using TMTOOLS? Maybe, there are other ways.
This is what I would use TMTOOLS for:
1) after having parsed compiler error output, highlight the region of the error and move caret there 2) source code manipulation such as refactoring, based on AST
I am new to textmate, there might be other ways to achieve this ..
otherwise I am hoping Allan is reading this and soon providing a stable API, then I could write the Erlang integration natively (but that is a problem of it's own, so far I have only written native Erlang integrations in C)
regards
On 14 Nov 2007, at 02:03, Roberto Saccon wrote:
Hans-Jörg, thanks for our explanations. Ok, I understand now that I should only use it for private purposes.
Regarding to your Erlang enhancements: What do you want to improve by using TMTOOLS? Maybe, there are other ways.
This is what I would use TMTOOLS for:
- after having parsed compiler error output, highlight the region of
the error and move caret there
Well, AFAIK the error output of Erlang is something like:
./test.erl:5: syntax error before:foo
I suppose you will output the error messages in an HTML window. To jump to a given file and a given line you can use TextMate's URL scheme.
see at http://macromates.com/textmate/manual/ using_textmate_from_terminal section 21.2
Each error would be written as an HTML link à la: <a href="txmt:// open/?url=file://./test.erl&line=5">test.erl:5: syntax error before:foo</a>
You wrote "...highlight the region of the error ...". This would mean you have a specific range. But AFAIK one only gets the line number. Or am I wrong?
- source code manipulation such as refactoring, based on AST
Which TMTOOLS function do you would need for that?
Ciao,
--Hans
thanks again for the helpful clarification
- after having parsed compiler error output, highlight the region of
the error and move caret there
Well, AFAIK the error output of Erlang is something like:
./test.erl:5: syntax error before:foo
I suppose you will output the error messages in an HTML window. To jump to a given file and a given line you can use TextMate's URL scheme.
see at http://macromates.com/textmate/manual/ using_textmate_from_terminal section 21.2
Each error would be written as an HTML link à la: <a href="txmt:// open/?url=file://./test.erl&line=5">test.erl:5: syntax error before:foo</a>
Great, that wil do the job !
You wrote "...highlight the region of the error ...". This would mean you have a specific range. But AFAIK one only gets the line number. Or am I wrong?
Oh, consider a line as a region
- source code manipulation such as refactoring, based on AST
Which TMTOOLS function do you would need for that?
I am still looking for it, a function which lets me replace text at given line and position (as position I have token column number, but that can easily be transformed to a regexp)
regards