Hello All,
Great to see such an active community for a text editor!
I've been using TM for a largish python project. I have quite a few source files now and using the project draw and tabs to navigate between them.
Anybody know how I can mark one file in my project as the file to run using the Run Script Command.
Would I need to modify the Run Script Command for this to work?. I've looked at it in the bundle editor but it makes no sense to me. I tried hacking some changes in so that it would run a specific file rather than $TM_FILEPATH but without luck.
Any help much appreciated.
Jay.
I don't know if there is a TextMate way for doing it.
But you can feed the TextMate's Commands any scripting language, It accepts AppleScript, bash and through bash eveything installed on your system, Am I wrong Allan?
So, for running a specific file, modify the Run Script Command to run yours:
python /path/to/your/file.py
And if you want to run it in the Terminal, something like the following AppleScript will do the job:
osascript <<- APPLESCRIPT tell app "Terminal" launch activate do script "clear; python ~/path/to/your/file.py" end tell APPLESCRIPT
- Husein
On 2/26/07, Jay Kyburz jay@jaykyburz.com wrote:
Hello All,
Great to see such an active community for a text editor!
I've been using TM for a largish python project. I have quite a few source files now and using the project draw and tabs to navigate between them.
Anybody know how I can mark one file in my project as the file to run using the Run Script Command.
Would I need to modify the Run Script Command for this to work?. I've looked at it in the bundle editor but it makes no sense to me. I tried hacking some changes in so that it would run a specific file rather than $TM_FILEPATH but without luck.
Any help much appreciated.
Jay.
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
I don't think there's a built in way to do this, but you can make yourself a new command easily.
I'd do this: on your project, click the 'I' button on the shelf. Add a project variable with the path to the the file you want to run. Call it, say, PROJECT_EXECUTABLE.
Then copy/paste the Run Script (PyMate) command and make a new one. Replace $TM_FILEPATH with $PROJECT_EXECUTABLE.
Just a suggestion.
On 2/25/07, Jay Kyburz jay@jaykyburz.com wrote:
Hello All,
Great to see such an active community for a text editor!
I've been using TM for a largish python project. I have quite a few source files now and using the project draw and tabs to navigate between them.
Anybody know how I can mark one file in my project as the file to run using the Run Script Command.
Would I need to modify the Run Script Command for this to work?. I've looked at it in the bundle editor but it makes no sense to me. I tried hacking some changes in so that it would run a specific file rather than $TM_FILEPATH but without luck.
Any help much appreciated.
Jay.
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