hello:)
I've some difficulties with the macro "Convert ASCII Symbol to LaTeX",.
arrowShortcuts.rb is there :
/Library/Application Support/TextMate/Bundles/Latex.tmbundle/Support/ bin/arrowShortcuts.rb
and in the macro we have : command = ""$TM_BUNDLE_SUPPORT/bin/ arrowShortcuts.rb"";
or Show TM_* Variables give :
TM_BUNDLE_PATH=/Library/Application Support/TextMate/Bundles/ TextMate.tmbundle TM_BUNDLE_SUPPORT=/Library/Application Support/TextMate/Bundles/ TextMate.tmbundle/Support
so i think that the script is not found !
the script is fine because i put the code in a command and the command works very well
But i've a question
TM_BUNDLE_SUPPORT is unique or this variable depends on Bundle ?
how do I have to make so that works?
Thanks
Alain
On Feb 22, 2006, at 11:09 AM, Alain Matthes wrote:
I've some difficulties with the macro "Convert ASCII Symbol to LaTeX",.
Please describe how you tried to use it, and what exactly happened.
arrowShortcuts.rb is there :
/Library/Application Support/TextMate/Bundles/Latex.tmbundle/ Support/bin/arrowShortcuts.rb
and in the macro we have : command = ""$TM_BUNDLE_SUPPORT/bin/ arrowShortcuts.rb"";
or Show TM_* Variables give :
TM_BUNDLE_PATH=/Library/Application Support/TextMate/Bundles/ TextMate.tmbundle TM_BUNDLE_SUPPORT=/Library/Application Support/TextMate/Bundles/ TextMate.tmbundle/Support
so i think that the script is not found ! TM_BUNDLE_SUPPORT is unique or this variable depends on Bundle ?
TM_BUNDLE_SUPPORT points to the support directory of the bundle that the command/macro/whatnot is in. So when you check it from the "Show TM_* variables" command, which is in the "TextMate" bundle, it points to the support directory of the TextMate bundle. Open the bundle editor, go to the textmate bundle and copy the "Show TM_* variables" command, and move the copy to the Latex bundle, and run it from there. What does it say now?
how do I have to make so that works?
Please provide some more details. For instance, if you are in a LaTeX file, with the language saying LaTeX, and you type ==> and then run the macro, what happens?
Btw, this macro is very much a work in progress, more of a proof of concept kind of thing. It is supposed to look at the last three letters before the caret and do something clever with them, so if you have more suggestions for other three-letter combos that should be generating standard commands, please suggest them.
Thanks
Alain
Haris
Le 22 févr. 06 à 18:20, Charilaos Skiadas a écrit :
TM_BUNDLE_SUPPORT points to the support directory of the bundle that the command/macro/whatnot is in. So when you check it from the "Show TM_* variables" command, which is in the "TextMate" bundle, it points to the support directory of the TextMate bundle. Open the bundle editor, go to the textmate bundle and copy the "Show TM_* variables" command, and move the copy to the Latex bundle, and run it from there. What does it say now?
No it's fine. TM_BUNDLE_PATH=/Library/Application Support/TextMate/ Bundles/Latex.tmbundle I was doubtful because it's normal but I believed that the result depended on the file active and not on the position of the command "Show TM_* Variables" in the bundle editor !!
how do I have to make so that works?
Please provide some more details. For instance, if you are in a LaTeX file, with the language saying LaTeX, and you type ==> and then run the macro, what happens?
I type --> I select the three symbols and then i go in the macros menu...
If I put the code arrowShortcuts.rb in a command "convert" and if i make the same things ; that's fine ?!
Alain
On Feb 22, 2006, at 11:49 AM, Alain Matthes wrote:
I type --> I select the three symbols and then i go in the macros menu...
Don't select the three symbols. The macro will do it for you. The macro selects the three characters right before the cursor, and calls the command on them. So just type --> and press ctrl-shift-s (at least that's the shortcut in my system, you can change it if you like)
If I put the code arrowShortcuts.rb in a command "convert" and if i make the same things ; that's fine ?!
yes, but then you'll have to select the three characters first. The point of the macro was not to have to do that. All arrowShortcuts.rb is doing is reading its input (in this case the three selected characters), matching it in its dictionary (hash), and then outputting the expanded form.
Alain
Haris
Le 22 févr. 06 à 19:40, Charilaos Skiadas a écrit :
On Feb 22, 2006, at 11:49 AM, Alain Matthes wrote:
I type --> I select the three symbols and then i go in the macros menu...
Don't select the three symbols. The macro will do it for you. The macro selects the three characters right before the cursor, and calls the command on them. So just type --> and press ctrl-shift-s (at least that's the shortcut in my system, you can change it if you like)
If I put the code arrowShortcuts.rb in a command "convert" and if i make the same things ; that's fine ?!
yes, but then you'll have to select the three characters first. The point of the macro was not to have to do that. All arrowShortcuts.rb is doing is reading its input (in this case the three selected characters), matching it in its dictionary (hash), and then outputting the expanded form.
Alain
Haris
thanks it's perfect !
perhaps two lines of comments could help ! but i do'nt no if it's possible in the macros.
Alain
ps : I try différent macros and in Convert Selection to Table, when i select executeCommandWithOptions i found :
bundlePath = "/Users/haris/Library/Application Support/TextMate/ Bundles/Latex custom.tmbundle";
"/Users/haris/ why this here ?
On 22/2/2006, at 20:06, Alain Matthes wrote:
ps : I try différent macros and in Convert Selection to Table, when i select executeCommandWithOptions i found :
bundlePath = "/Users/haris/Library/Application Support/TextMate/ Bundles/Latex custom.tmbundle";
"/Users/haris/ why this here ?
The macro recording facility is generic and records a few things which are overwritten when the macro is replayed. So this line is effectively redundant.