With the “Hook to New Note” menu, you can simultaneously create, link, name and store a new file or object. The Preferences’ Notes tab is where you configure the behavior the behavior of the “Hook to New” menu. However, this tab only deals with the creation of files. We refer to these files as “notes”.
In particular, this tab determines
- in what folder the new note will be stored
- what template the new note will be based on, and
- whether the new note’s name should have a particular prefix or suffix
The Notes folder
When you use the “Hook to New” command, Hook stores the new file in the Hook Notes folder. By default, this folder is called “Notes” and is stored in ~/Documents/ (i.e., it is ~/Documents/Hook/Notes).
However, you can use this tab to select any folder to which macOS grants you permission.
You can even store your Notes folder in shared storage, such as iCloud or Dropbox.
Once a note is created, you can move it wherever you want, and links to and from them will normally still be valid.
The “⌘N uses template” setting
Summary: The “⌘N uses template:” setting controls the template that is used for creating apps with ⌘N. This implicitly determines the app that is launched when you use ⌘N is Hook. For your convenience, Hook places the default app at the top of the “Hook to New” menu.
The “Hook to New” menu contains entries for many apps. To quickly create a new note of a default type, without even opening the “Hook to New” menu, use ⌘N. You can control the app with which ⌘N creates notes by clicking on the “⌘N uses template” button. This presents you with a drop down menu to choose from.
Only apps with a file in the template folder are listed there. (See Template folder below.)
The “Hook to New” menu can also contain database apps, like OmniFocus, which do not create user editable files. However, those apps cannot yet be the ⌘N default. (That restriction will be removed later.)
The “⌘N uses template” preference also determines which app shows up at the top of the “Hook to New” menu.
For example, if in “⌘N uses template” you select “template.txt”, then whenever you issue ⌘N, Hook will
- put a renamed copy of that file (i.e., a “note file”) in the Notes folder, and
- open ask macOS to open that note file
As you would expect, macOS will open that note file based on its extension and your macOS Finder preferences. See: 2 Ways to Change the Default Application to Open Files With in Mac OS X. For example, you can configure macOS to open .txt files with TextEdit, BBEdit, or any other editor on your Mac. (Hook keeps things simple: the default app for a file extension (like .txt) is determined by your Finder settings, not by Hook.)
That’s most of what you need to know. The following subsections clarify the above and give you even more power.
The Templates folder
Hook creates two template folders for you in ~/Documents/Hook/templates:
- the “built-in templates” folder, whose content is created and managed by Hook, and
- the “custom templates” folder, which is empty by default. You can add entries here if your favourite app isn’t showing up in the “Hook to New” menu, or if you want to override a built-in template.
If you want the templates to be elsewhere, just create an alias or symbolic link in ~/Documents/Hook/templates pointing to its new home. You can also move the entire Hook folder if you create an alias or link from ~/Documents/Hook to its new home. (Later, we might add a template manager in the app. But the current solution is quite straightforward. Tweet feature requests to @CogSciApps ).
Templates in a nutshell
Here’s a brief summary of how templates work in Hook.
- Hook has a template files folder (per previous section) which affects what is presented in the “Hook to New” menu,
- Hook populates the “built-in templates” folder with blank templates (empty files),
- you can add and remove templates from the custom template folder,
- if you want new notes (such as .txt notes) to have default text in them, just add a template in the custom folder, and
- if your favourite file-creating app is not listed in “Hook to New” menu, try creating a blank file with the app and storing it in the custom template folder.
More details on templates
To view your templates, just activate the “Open Templates Folder in Finder” button in this preference pane.
The “Hook to New” menu command contains one entry for every file type that is represented in the ~/Documents/Hook/template folder. In macOS, file type is determined by file extension, such as
- “.txt” (plain text format),
- “.rtf” (rich text format)
- “.pages” (Pages format),
- “.docx” (Word format),
- .xlsx (Excel format),
- .xls (Excel format),
- .graffle (OmniGraffle format),
- .oo3 (OmniOutliner format), and
- .ooutline (OmniOutliner format)
Template files must have the format “template.\<extension>”. This means that they must start with the word “template” followed immediately by a period and a filename extension.
You can experiment with templates to your heart’s content. You can easily revert to the original state of affairs by using the “Restore Built-in Notes Templates” button, and emptying the “custom templates” folder. This button sneds the contents of the built-in templates folder to the trash, and copies all the built-in templates from the Hook application folder back into the “Built-in Notes Templates” folder.
Removing apps from the “Hook to New” menu
If you would like to prevent a particular file-based app from showing up in the “Hook to New” menu, just make sure there is no file in the templates folder that has its extension. For example, if you want to prevent OmniGraffle from showing up in the “Hook to New” menu, just delete template.graffle from the “built-in templates” and “custom templates” folder.
Automatically adding a prefix and/or suffix to new notes
On the General preferences tab, you can also configure Hook to automatically add a prefix and/or a suffix to note files that it creates. This can make them easier to find with Spotlight or a launcher (such as Alfred or LaunchBar).
For example, you might configure Hook to prefix new note files with an opening square bracket ([)). Later, to quickly find this note without navigating links, just type “[” in a launcher, followed by part of the filename. Or use Spotlight. This strategy is explained in detail in the “Surf Strategically” chapter of Beaudoin’s ebook, Cognitive Productivity with macOS.
On the General preferences tab, you can also configure Hook to automatically apply the “Hook” Finder tag to files it creates or simply links. That way you can easily find all your Hook linked files using Spotlight. You can also use Spotlight to access a particular file you know you’ve tagged and which matches some other parameter (such as its date modified, name, or content).