Collin Donnell

April 6, 2021

Running the current file in Nova

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.

Here's how you do it:
  1. Command+O, select the folder to open as a new project.
  2. Click on the project name.
  3. Next to Tasks, click the plus button.
  4. Click on the Arguments tab.
  5. Insert wildcard > File Path.
  6. 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.
  7. At the bottom of the window, click the Open Report menu, and select On Run.
  8. 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!