Is this possible? If not, could you put it on the roadmap, Allan? :) ___________________ Ben Jackson Diretor de Desenvolvimento
ben@incomumdesign.com http://www.incomumdesign.com
On 21/12/2005, at 0.07, Benjamin Jackson wrote:
Is this possible? If not, could you put it on the roadmap, Allan? :)
It's not possible now. Also, it's not unproblematic to implement, I think, since partial regexes are easily illegal or you can accidentally enter something that will take exponential time until you add the final '?' or similar.
-- Sune.
One thing i would love to see that is easy is "fast find": the user types a start code, and then each character they type is added to the find string which occurs live...
In other words, I hit cmd-I (for incremental search),then "e" and the e in One would be highlighted. add "a", and the search moves to "easy", add "p" and i get a beep and the search stays where it is (not found in buffer). backspace, i am searching for "ea" again. Click or cmd-I again exits the search.
This is amazingly valuable many times a day.
Firefox has it, as does Safari via the lovely AcidSearch plug-in (if you don't have it, grab it!)
tim
Acidsearch = http://www.pozytron.com/acidsearch
On 21/12/2005, at 12:22 PM, Sune Foldager wrote:
[partial regex is] not unproblematic to implement, I think, since partial regexes are easily illegal or you can accidentally enter something that will take exponential time until you add the final '?' or similar.
One thing i would love to see that is easy is "fast find": the user types a start code, and then each character they type is added to the find string which occurs live...
Isn't that what ctrl-s is doing?
Xmas!!! Yay. There is so much that is just invisible in this program.
As this shortcut is not under Edit:Find (with all the other find options) I would never have seen it. In fact it appears no where in the help (searched working with text, find, incremental) nor in the menus (that I could see).
Thanks ever so much for this discovery, Tim
I have just moved from using xcode to TM for Ruby development and have set up a project with several folders. I have several questions/ problems I hope someone can help me with:
1. I would like the run script command (command R) to save all files and run my designated 'main' file - this may not be the one that is currently open. This is what Xcode does and while I could write a macro to do this it would seem a generally useful thing to have built in.
2. When I run script (command R) in my 'main' ruby file I get an error window popping up, but when I click on any of the hyper links a blank file is opened, rather the one identified in the error line. The file in error is in the project.
I have looked in the Ruby bundle, but what is going on is a mystery to me.
Thanks for any help,
Dave.
Dave On Dec 21, 2005, at 10:11 AM, Dave Baldwin wrote:
- I would like the run script command (command R) to save all
files and run my designated 'main' file - this may not be the one that is currently open. This is what Xcode does and while I could write a macro to do this it would seem a generally useful thing to have built in.
You can probably do what we do in the LaTeX bundle. In there, you can define a project specific environment variable, in that case TM_LATEX_MASTER, and have that be used if it is set, via a command like: M=${TM_LATEX_MASTER:=$TM_FILEPATH} and then using "$M" whenever you need to. Take a look at the "Typeset & View (PDF)" command in the LaTeX bundle. As for saving all files in project, you can set that as the "Save:" option in the command editing window. As I understand it, it is not currently set up because this way you an execute a Ruby script even if it is not saved, by saving it in a temporary directory, as the current command does. So I would consider this a separate command, preferably associated to cmd-B (for build).
- When I run script (command R) in my 'main' ruby file I get an
error window popping up, but when I click on any of the hyper links a blank file is opened, rather the one identified in the error line. The file in error is in the project.
I believe that we do that also in the LaTeX bundle, same command. Not sure how we accomplish it though. I think there is a script doing that, but I haven't looked into it too closely.
I have looked in the Ruby bundle, but what is going on is a mystery to me.
What part of the Ruby bundle are you referring to?
Thanks for any help,
Dave.
Haris
On 21/12/2005, at 18.30, Charilaos Skiadas wrote:
Dave On Dec 21, 2005, at 10:11 AM, Dave Baldwin wrote:
- I would like the run script command (command R) to save all
files and run my designated 'main' file - this may not be the one that is currently open. This is what Xcode does and while I could write a macro to do this it would seem a generally useful thing to have built in.
You can probably do what we do in the LaTeX bundle. In there, you can define a project specific environment variable, in that case TM_LATEX_MASTER, and have that be used if it is set, via a command like: M=${TM_LATEX_MASTER:=$TM_FILEPATH}....
Yes, I can add that to the Run Ruby command, for general use.
The current problem with the Run Ruby command is that it handles saving the file itself, to allow it to work with unsaved files. This makes it impossible to use save all files of course. This was an idea of Allan's, and I don't really like it, but on the other hand TM can't currently do it in any other way. I still think a more transparent system should be made, but I'm not entirely sure how it's best done.
-- Sune.
On Dec 21, 2005, at 12:11 PM, Sune Foldager wrote:
On 21/12/2005, at 18.30, Charilaos Skiadas wrote:
Yes, I can add that to the Run Ruby command, for general use.
The current problem with the Run Ruby command is that it handles saving the file itself, to allow it to work with unsaved files. This makes it impossible to use save all files of course. This was an idea of Allan's, and I don't really like it, but on the other hand TM can't currently do it in any other way. I still think a more transparent system should be made, but I'm not entirely sure how it's best done.
Why not create a separate "build" or "save all and run" command, that tries to save all files in the project etc, possibly bound to cmd-B? This way the run command can still be used for testing quick hacks with untitled files, a feature I really like. Coming from LaTeX, I'm used to using cmd-B when I want to see what the result of my changes is. Alternately, we could use cmd-R and cmd-shift-R for the two commands.
-- Sune.
Haris
On 21 Dec 2005, at 17:30, Charilaos Skiadas wrote:
Dave On Dec 21, 2005, at 10:11 AM, Dave Baldwin wrote:
- I would like the run script command (command R) to save all
files and run my designated 'main' file - this may not be the one that is currently open. This is what Xcode does and while I could write a macro to do this it would seem a generally useful thing to have built in.
You can probably do what we do in the LaTeX bundle. In there, you can define a project specific environment variable, in that case TM_LATEX_MASTER, and have that be used if it is set, via a command like: M=${TM_LATEX_MASTER:=$TM_FILEPATH} and then using "$M" whenever you need to. Take a look at the "Typeset & View (PDF)" command in the LaTeX bundle. As for saving all files in project, you can set that as the "Save:" option in the command editing window. As I understand it, it is not currently set up because this way you an execute a Ruby script even if it is not saved, by saving it in a temporary directory, as the current command does. So I would consider this a separate command, preferably associated to cmd-B (for build).
- When I run script (command R) in my 'main' ruby file I get an
error window popping up, but when I click on any of the hyper links a blank file is opened, rather the one identified in the error line. The file in error is in the project.
I believe that we do that also in the LaTeX bundle, same command. Not sure how we accomplish it though. I think there is a script doing that, but I haven't looked into it too closely.
I have looked in the Ruby bundle, but what is going on is a mystery to me.
What part of the Ruby bundle are you referring to?
I was looking at the tmruby.rb file.
I have spend some time looking at the Run script and the tmruby file and basically understand what they are doing. I don't think it is too hard to get the behaviour I want, and having a TM_MAIN_RUBY or some such variable as you have for Latex looks like the best way, particularly as this can be bound to a project. Thanks for this tip.
My main frustration is not being able to click through on reported errors. While I understand what the script is doing, I don't understand why the error produces different results when run from the terminal or within TextMate.
From the terminal I get:
/Users/dave/Chips/DES/mediaUI/Classes/ui.rb:63:in `initialize': undefined method `readConfigW' for #<UI:0x11087cc @allowTransition=false, @keysFromFile=false> (NoMethodError) from /Users/dave/Chips/DES/mediaUI/Classes/os_gl.rb:32:in `initialize' from start.rb:34
but from within TextMate the HTML looks like: <p id="exception"><strong>NoMethodError</strong>: undefined method `readConfigW' for #<UI:0x35b84c @allowTransition=false, @keysFromFile=false></p> <blockquote><table border="0" cellspacing="0" cellpadding="0"> <tr><td><a class="near" title="in ./Classes/ui.rb" href="txmt://open? url=file://./Classes/ui.rb&line=63">method initialize</a></td><td>in <strong>ui.rb</strong> at line 63</td></tr><tr><td><a class="near" title="in ./Classes/os_gl.rb" href="txmt://open?url=file://./Classes/ os_gl.rb&line=32">method initialize</a></td><td>in <strong>os_gl.rb</ strong> at line 32</td></tr><tr><td><a class="near" title="in /Users/ dave/Chips/DES/mediaUI/start.rb" href="txmt://open?url=file:///Users/ dave/Chips/DES/mediaUI/start.rb&line=34"><em>at top level</em></a></ td><td>in <strong>start.rb</strong> at line 34</td></tr></table></ blockquote>
The two differences are
1. In 'top level' line in terminal just includes the file name while in the HTML it has the full path name in the url (and I can click through here).
2. The lower level lines in terminal have the fully qualified path name, but the HTML is relative to the top level file (and clicking through just opens an empty window
Maybe the cause is the fork?
One fix would be to combine the top level path with the lower level paths when making the url to make it an absolute path.
Dave.
Thanks for any help,
Dave.
Haris
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
On 22/12/2005, at 12.35, Dave Baldwin wrote:
I have spend some time looking at the Run script and the tmruby file and basically understand what they are doing. I don't think it is too hard to get the behaviour I want, and having a TM_MAIN_RUBY or some such variable as you have for Latex looks like the best way, particularly as this can be bound to a project. Thanks for this tip.
I am pretty sure the tmruby command should be left untouched, and all that is needed is a small command to do the following: [[ ${TM_WARN_LEVEL:-0} > 0 ]] && w='-w' || w='' cd `dirname "$TM_RUBY_MASTER"` ${TM_RUBY:-ruby} $w -- "$TM_BUNDLE_SUPPORT/tmruby.rb" `basename "$TM_RUBY_MASTER"`
(not tested)
My main frustration is not being able to click through on reported errors. While I understand what the script is doing, I don't understand why the error produces different results when run from the terminal or within TextMate.
It produces different results due to the nice formatting applied.. that the result doesn't WORK then, is a bug in tmruby.
- In 'top level' line in terminal just includes the file name
while in the HTML it has the full path name in the url (and I can click through here). 2. The lower level lines in terminal have the fully qualified path name, but the HTML is relative to the top level file (and clicking through just opens an empty window
Ok, so that's an error. I'll have a look.
Maybe the cause is the fork?
I don't know, but the fork very needed at this time at least. There might be other ways to do it.
-- Sune.
Another problem is that when there is a temporary file used, the links just open empty windows... I'll look into that as well.
-- Sune.
Both problems have now been fixed.
-- Sune.
Thanks, this and your other suggestion are working like a charm.
Dave.
On 22 Dec 2005, at 23:21, Sune Foldager wrote:
Both problems have now been fixed.
-- Sune.
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