If you're doing any amount of JavaScript/JXA coding, and you're using Script Editor, you're really doing yourself a disservice.
I'm still looking for someone who doesn't have Atom installed, and is willing to walk through the process of getting Atom installed so we can document the process.
Here's what I think you need to do, and we can go from there. I'm sure I'll forget something, hence why I want to document this process.
Select "Install" (Your screen won't look exactly like this, because I have some options installed):
Install the following packages (some of these may be installed by default):
build
language-javascript-jxa
script
I think that's all that's required.
Every time you open an existing or new file in Atom, it needs to know the "grammar". It has an "Auto" setting, but you'll need to change it for JS/JXA. Select Edit->Grammar and type in "JXA".
If anyone gets this far, I'll tell you how to assign file extensions to JXA.
You’re also going to end up wanting to do a lot of customization.
Atom supports keymapping, but I found it confusing and it didn’t always work. So all my keymapping is done in KM.
One of my most-common used macros involves working on HTML or JXA scripts, that are going to be used in KM. For example, I’ll have a KM action that runs the script file I’m working on. So when I’m in Atom, I press F15 and it saves the script, then triggers the macro that uses the script. Works really well.
Oh. This is embarrassing. I keep meaning to make this better. Here's the macro it runs right now:
I just disable and enable the macro I want to run as needed. I keep meaning to add a "Long Press" option to pull up a pick list, but I never seem to get around to it, even though every time I go in this macro and enable/disable, I feel shame. .
I think I’d put the macro name or UUID in a comment at the top of the file, so I didn’t have to manage the target macro in the runner macro — but I won’t know for sure until I start building workflows.
Looks like AppleScript support sucks. Is there a way to get the path of the front document?
I haven’t tried, but the if you hover over the tabs, you get the full path, so I suspect you might be able to get it via UI Browser. If you figure it out, let me know.
I shamed myself into fixing this, so I’m use a modified version of my Execute Macro by Name (Spotlight) macro to allow me to pick from a list (long keypress), or run the last one selected. Should be done soon.