Opening specific folders in a text editor quickly on Mac OS

I wanted a shortcut to open specified folders (for notes, development projects, etc.) in specified programs (a plain text editor, an IDE, etc), and I think I found a solution that works well.
Step 1: Create a script with the Script Editor
The script is really simple. Follow this structure:
do shell script "open -a '[Your preferred text editor]' '[Path to the folder you want to open in the text editor]'"
Example:
do shell script "open -a 'Zed' '/Users/ahaldorsen/notes/'"
Step 2: Save the script as an app

- Go to
File>Export - Give the file a name in the
Export Asfield. I recommend something unique, for example,notes.app. The comma is optional. I add it to the beginning of the shortcut filenames to make sure they are unique, and appear first in the search results in Spotlight. - Find a folder to save the file. The path is not really important, as long as it is on the machine
- Select
File FormatApplication - Click
Save
Step 3: Try the new shortcut
Open Spotlight (Apple’s search functionality) with Cmd + Spacebar, type ,notes and press Enter. Your text editor should now open, loaded with the specified folder.
Step 4: Repeat the process for more folders
As a developer I have multiple text based projects that I work on in different text editors and IDEs. I’ve added shortcuts like this for most of them. For example:
- My general notes folder, opened in a simple text editor
- The main codebases I’m working on, opened in IDEs
- My
~/.zshrcfile, opened in a simple text editor
As a bonus, I can get a list of the shortcuts by opening Spotlight and typing , because the filenames all start with a comma.