Is it possible to configure TextMate to launch the program I am currently writing (using the Command+R shortcut) with some command line parameters?
TextMate launch configuration
textmate
Related Question
- Figure out which command is bound to a keyboard shortcut in TextMate
- How to create TextMate project that contains all files in a folder (and updates dynamically)
- Using TextMate, is there a hotkey to move the cursor out of the quotations
- MacOS – Use Textmate (or any arbitrary application) with Lion’s “Versions” feature
- How to edit theme colors in TextMate 2
- MacOS – How to launch TextMate (and probably other software) from the command line
- TextMate : Keeping the KeyBindings after an update
- TextMate 2: How to enable/disable Code Folding
Best Answer
What language are you writing the program in? I'll use Python as an example.
Go to Bundles menu > Edit Bundles. Find and click on
Python
in the lefthand column. Click onMenu Actions
in the middle column, thenRun Script
in the righthand column.At the bottom of the window you will see the script that is run each time you use ⌘+R. Look for the line that begins with
TextMate::Executor.run
.Right now, it appears for me as this:
Change it to this:
Note the addition of
:script_args => ["-arg1", "-arg2"]
. Change the arguments in the parentheses to the arguments you want passed.You can find other options to be used with
TextMate::Executor.run
in the source file on GitHub.