In my previous post on Mac code editors, Nova did pretty well-fitting some of my criteria, but a big one that it didn't was that I couldn't find a way to hit Command+R and run whatever script I'm currently editing. It turns out I was partially wrong, and this is sort of doable in Nova right now.
If you open a file in Nova directly, I can't figure out how to do this. However, if you have a scripts folder, it's totally doable using a custom run task.
If you open a file in Nova directly, I can't figure out how to do this. However, if you have a scripts folder, it's totally doable using a custom run task.
Here's how you do it:
- Command+O, select the folder to open as a new project.
- Click on the project name.
- Next to Tasks, click the plus button.
- Click on the Arguments tab.
- Insert wildcard > File Path.
- In the Run tab, type your run script (e.g., ruby "$1"). Using the osascript command, you could probably run a script to run in a terminal — useful for interactive scripts.
- At the bottom of the window, click the Open Report menu, and select On Run.
- Hit Command+R to run your frontmost script.
That sounds like a lot of steps, but it's actually straightforward. I still wish you could run a single script without opening a folder, but that's mostly okay. My other wish is that you could save your build tasks and reuse them in different projects, but I bet that'll come eventually.
Here's a gif of me performing the whole process in about twenty-five seconds.
Enjoy!