Continuing the discussion from How Do I Create Zip File in AppleScript and Retain Finder Tags?:
Thanks for the suggestion.
I haven’t tried this app, but I did find one incorrect statement on their web page:
Spotlight doesn’t even allow us to search our Applescript code files and Spotlight doesn’t index all of the folders that hold our other types of source code
Spotlight does search inside of .scpt
files, as least for macOS 10.12.6. I just tested it. The Finder will also provide a preview by just pressing the SpaceBar.
I have arrived at using the macOS file system, plus a text expander like Typinator, after a long and tortuous path. I have tried extensively many code snippet managers (but not Scriptlight) and have found them all lacking in some respect. Maybe ScriptLight is better, I don’t know. If any of you think so, please share its advantages over what I have shared here using the macOS+.
Although I initially discounted using the macOS files with Finder, Path Finder, Spotlight (general and in Finder), I have now come to the conclusion that it is the best “snippet” manager, where “snippet” means all my scripts, whether 10 lines or 3,000 lines.
The final feature that pushed me over the hump was using Finder Tags. I’ve been using them now for about a year, so most of my useful scripts have tags. I find it very easy to assign tags in the Save As dialog, to add/change tags in the Finder, and to search for files using Finder Spotlight. In all cases the system provides me with a great auto-completion when selecting a tag. One key factor is that I make good use of prefixes for most of my tags.
Some examples of my Tag Prefixes
Lang.AS
Lang.ASObjC
Lang.Bash
Lang.JS
Lang.JXA
. . .
SW.AMail
SW.BBEdit
SW.Chrome
SW.Contacts
. . .
CAT.Files
CAT.Find
CAT.Handler
CAT.HTML
CAT.Lists
CAT.Strings
. . .
These prefixes make selecting a tag very easy, acting like a drop-down list:
Demo Tag Selection
The tag I use the most, Lang.AS
, is the easiest to select. All I have to do is type l
, it is auto-selected, then I press RETURN to assign. Next if I press l
again, it auto-selects Lang.ASObjC
because it knows I have already selected Lang.AS
.
This same auto-complete drop-down list works in Save As dialog, Finder Search, Finder Assign Tags, PF Assign Tags, etc.
Thanks to @ShaneStanley, I have 5 great Finder Tag scripts:
- Get List of All Tags
- Get Tags assigned to a File
- Replace All Tags assigned to a File
- Add Tags to File
- Compress Files with Tags and retain the Tags
One other great benefit of using Spotlight is that I can search on a specific subject and it will find all related files/documents, including:
- Scripts
- Evernote Notes
- Local HTML docs
- PDFs
- Keyboard Maestro Macros
- etc.
With Spotlight I can:
- Use on-the-fly search criteria
- Modifiable Saved Searches
- Just enter text, and it find that text in file name and file contents and tags
- In general Spotlight, I can select text (e.g. code snippets) in the auto-preview
I can also select text in the Path Finder Preview Panel.
With Typinator, I can search for and enter script handler calls from my Script Libs into SD.
So, lots of independent features of the macOS and key apps come together synergistically to make a great code/snippet manager.