How to save your own file template on Mac
You can do this with Note My, and here is how to keep the document in front of you as a template, put tokens in it that fill themselves in, and remove it again when it stops earning its place.
Every developer, sysadmin and technical writer ends up with a shape they retype. A comment header with a date and an author line. A shell script that always starts the same three lines. A config file where two values change and nothing else does. Retyping it is a small tax you pay several times a week, and it is exactly the kind of thing an editor should absorb.
Note My ships with 40 built-in templates, and it will also keep yours. This guide covers saving the document you are looking at as a reusable starting point, filling it with tokens that resolve themselves, and removing it later.
What a saved template is
A template here is a whole file's worth of text with a name attached. You pick it from a menu and you get a new document that starts out as that text. The built-in catalogue works the same way: four groups — Documents, Licenses, Config and Languages — holding 40 entries between them, each with a menu title and a filename such as README.md, .editorconfig or main.py. Anything you save yourself joins a fifth group called My Templates.
Two things follow from that, and both work in your favour:
- A template is a starting point, not a rule. What you get is an ordinary document you own outright. Keep the whole thing, cut it back to the header, paste something else in above it — the template has done its job the moment the text is in front of you, and nothing about it constrains what the document becomes.
- The template and the document stay independent. A template holds text, and creating a document from it hands you a fresh copy. Edit that copy as hard as you like, save it anywhere, rename it twice: the template you saved is untouched and ready for the next time you reach for it.
Templates you save stay on your Mac. Nothing is uploaded, there is no account, and your files never leave the machine — so a template can hold a client name or an internal path without a second thought.
Save the current document as a template
-
Get the document into the shape you want to start from
Open a new document with ⌘N, or open one you already have, and pare it back to the parts that never change. What is left is the template. If a value changes every time but in a predictable way — today's date, the year, your name — read the next section before you save.
-
Open the Templates menu
Click the Templates pull-down in the toolbar — the third item, with a chevron beside it. Its tooltip states the job plainly: "New file from a template, save the current file as one, or insert a smart token". The same menu is File ▸ New from Template. Use whichever is closer to your hand: the two entry points always show you the same list, so there is no wrong one to reach for.
-
Choose Save Current Document as Template…
The command ends in an ellipsis — the macOS convention for an item that asks you something before it commits, rather than acting the instant you release the mouse. Name it after the thing it makes — "Shell script header", "Client invoice" — because the name is what you will recognise when you are reading the menu in a hurry. Once it is done, your template appears under My Templates at the bottom of the same menu — in the toolbar pull-down and in File ▸ New from Template alike.
-
Use it
Pick it from either entry point and you get a new document containing the template's text. Nothing lands in the Finder until you save it with ⌘S or ⇧⌘S. Until then our auto-recovery safety net looks after it: if the app closes unexpectedly, the untitled document comes back on its own as a starred tab.
Put self-filling tokens in your own template
This is what turns a saved file into something better than a copy-and-paste. There are 14 smart tokens, and our template library fills them in for you, so a header that has to carry today's date is right without you touching it.
| Token | Resolves to |
|---|---|
{{DATE}} | Today's date in long form |
{{DATE_ISO}} | Today's date as YYYY-MM-DD |
{{TIME}} | The current time, 24-hour HH:mm |
{{DATETIME}} | Date and time, ISO 8601 |
{{YEAR}} | The current four-digit year |
{{AUTHOR}} | Your name from Settings ▸ Editing, or your macOS account's full name |
{{USER}} | Your short macOS login name |
{{UUID}} | A freshly generated lowercase UUID |
{{FILENAME}} | The current file's name |
{{FILEBASE}} | The file's name without its extension |
{{PROJECT}} | A project-name placeholder, for templates |
{{CURSOR}} | Nothing visible — it marks where the caret starts, and leaves no trace behind |
{{COMMENT}} | An editor action: a line comment for this language, or comments the selected lines |
{{COMMENT_BLOCK}} | An editor action: a block comment with the caret inside, or wraps the selection |
Two ways to get one into your text. Use Templates ▸ Insert Smart Token ▸ and pick from the submenu, or type {{ in the editor and let the completion pop-up offer them. The submenu names every token in full, so use it while you are learning the set; the pop-up is faster once you know what you want. The two editor-action tokens sit in the submenu alongside the rest, which is where to reach for those.
One detail is worth knowing before you save. The Insert Smart Token submenu inserts the value: choose {{YEAR}} and you get 2026 in the document, which is not what a template wants. To store the literal token so it resolves later, hold ⌥ while choosing the item. Every value token has that alternate.
{{CURSOR}} is the one people forget and then miss. Put it where you want to be typing the moment the new document opens — after the description line, inside the function body, at the first value you always change. It leaves nothing behind.
Escaping a token you want to keep as literal text
If your template is about tokens — documentation, a worked example, a file processed later by something else using the same braces — put a backslash in front: \{{DATE}} gives you a literal {{DATE}} in the finished document, and the backslash itself does not show up.
Unknown tokens are safe too. An unrecognised {{SOMETHING}} is left untouched, not blanked out, so a typo leaves visible evidence rather than a silent hole in your file.
To fill in every token in the document at once — text you pasted in, or a template you are working on — use Templates ▸ Expand Smart Tokens in Document.
Delete a template you no longer use
Open the Templates menu, hold ⌥, and the custom template you are pointing at changes into Delete "<name>". Release ⌥ and it goes back to being the normal item — the destructive command stays out of sight until you deliberately ask for it. The alternate belongs to your own entries, so the 40 built-ins stay where they are and the catalogue you rely on is always complete.
Revising a saved template is a short round trip: create a document from it, change what needs changing, save it as a template again under the name you want, then ⌥-click the old one away. Working that way means every revision starts from a real document: you read it in full, edit it with the tools you already use, and see exactly what you are keeping before you commit it.
Where your templates live on disk
Your saved templates are written as JSON to customTemplates.json, in a Templates folder inside the app's Application Support container. The Templates menu covers the whole life of a template — saving one, listing it, handing it to you as a new document, deleting it again — so in day-to-day use the file simply looks after itself and you can forget it is there.
It is still worth knowing where it sits. Everything you have built lives on your own disk, in the ordinary Application Support tree that a full backup of your Mac already sweeps up, so a year of accumulated headers and scratch files travels with the rest of the machine instead of sitting somewhere you have to remember separately. It stays where you put it, too: the templates in the menu this morning are the templates in the menu tonight, and they change only when you save one or delete one yourself.
A template or a macro?
Both save you repetition, and they solve different halves of the problem. A template stores a file's worth of text and hands it to you when you start a new document. Our macro recorder stores a sequence of actions — typing, deletion, paste, navigation, selection, find next and previous, replace, Go to Line, save, encoding and line-ending conversion, bookmarks and tab rename — and replays them on the current tab or on every open tab. Templates are for the same starting shape; macros are for the same change applied to files that already exist. One ⌘Z takes a whole macro run back, not just its last step.
Macros are recorded with ⌥⌘R, stopped with ⌥⇧⌘R and played back with ⌥⌘P. If you open a template and then immediately perform the same edits on it every time, the second half of that is a macro.
Three templates worth saving on day one
- Your file header. The comment block at the top of every source file, with
{{FILENAME}},{{AUTHOR}},{{DATE_ISO}}and a{{CURSOR}}on the description line. - Your scratch file. The one you open to think in. A heading with
{{DATETIME}}tells two of them apart afterwards. - The config you keep half-remembering. The one you copy from last month every time. Save it once with
{{PROJECT}}where the name goes.
Troubleshooting
The template I just saved is not in the menu
Close the menu and open it again — a fresh open is all it takes, and there is no need to restart the app. Then check the bottom of the list: My Templates sits after the four built-in groups, not among them, so a template you named Config will not be filed beside the built-in Config group.
Holding ⌥ is showing the normal item instead of Delete
You are pointing at a built-in. The Delete alternate belongs to the entries under My Templates, at the bottom of the menu — point at one of yours with ⌥ held and it appears. The 40 that ship with the app stay put, which is why the catalogue is the same every time you open it.
My tokens came out as literal braces in the new document
Check the spelling against the table above — an unrecognised token is deliberately left untouched, so {{AUHTOR}} stays exactly as typed. Check too for a stray backslash in front, which suppresses expansion. If the token is correct and simply has not resolved, run Templates ▸ Expand Smart Tokens in Document.
The token resolved when I was building the template
You chose it from Insert Smart Token ▸ without holding ⌥. The plain item inserts the value; the ⌥ alternate inserts the literal {{TOKEN}}. Delete the resolved value and insert it again with ⌥ held.
I want the new document to land in a particular folder
Start from File ▸ New from Template or the toolbar pull-down, then press ⌘S and choose the folder in the Save panel. The document arrives carrying the template's text and its resolved tokens, so the file you write out is finished before it ever touches the disk. If you have instead pasted template text into a document you already had open, run Templates ▸ Expand Smart Tokens in Document to fill the tokens in.
The new document is untitled until I save it
That is correct. A document created from a template is untitled until you save it. Nothing is written where you can see it until you choose ⌘S and a location — and in the meantime our auto-recovery safety net is holding on to it for you, bringing it back on its own after an unexpected quit, with no dialog and no list to pick from. When you do save, the Save As sheet arrives with a sensible extension already filled in — our advanced language identifier picks one that will reopen in the same language — and you can type over it.
Getting more out of My Templates
A handful of habits turn the group at the bottom of the menu into something you reach for daily:
- Name each one after what it makes. You will be scanning the list mid-thought, with the document you meant to write already half-formed in your head. "Shell script header" and "Client invoice" find themselves; "Header 2" makes you stop and think. A name that describes the output is the whole trick.
- Put a
{{CURSOR}}in every one. It costs a moment while you are building the template and saves one every single time you use it, because the new document opens with the caret already sitting on the first thing you have to change. It leaves nothing visible behind. - Keep each one short. A template you have to delete half of on arrival has stopped paying for itself. Where two versions of the same file keep pulling in opposite directions, save both: the list is cheap to scan, and two exact templates beat one you always have to trim.
- Let the tokens carry the parts that change. Anything that varies predictably — the date, the year, the filename, your name, a fresh UUID — belongs to a token rather than to your fingers. What is left in the template is the genuinely stable text, which makes it easier to read and easier to trust.
- Keep the sensitive ones without hesitating. Your templates stay on your Mac. There is no account, no sign-in and nothing uploaded, so a real client name, an internal hostname or a licence header with your full name in it is as safe in a template as it is in any file on your disk.
- Pair a template with a macro. If the same edits follow the same starting text every time, save the text as a template and record the edits as a macro. The pair covers the whole routine between them.
One more habit worth forming: revisit the group every few months. A template you saved in a hurry and never used costs you a line of menu, and clearing it out with an ⌥-click keeps the list short enough to read at a glance. The ones that survive that pruning tend to be the ones worth building on.
Frequently asked questions
How do I edit a template I have already saved?
Create a document from it, make your changes, then use Save Current Document as Template… again and delete the previous version by holding ⌥ over it in the menu. It takes seconds, and it has the advantage that you revise the template as a full document in the editor, with our find and replace, our indentation engine and every other tool you already use, and the whole of it in front of you while you decide what stays.
Where are my saved templates stored?
In a file called customTemplates.json, inside a Templates folder in the app's Application Support container — on your own disk, like everything else you save here, with nothing uploaded anywhere. The Templates menu handles the whole life cycle for you, from saving one to deleting it again, so the file looks after itself. Knowing it is there is useful for one reason: a full backup of your Mac carries your templates along with everything else in that folder.
Can I share a template with a colleague?
Share the file. Create a document from the template, save it, and send it however you normally send a file. Your colleague opens it, chooses Save Current Document as Template…, and it joins My Templates on their Mac in seconds. Because the exchange is an ordinary text file, it travels through whatever your team already uses, and each Mac keeps its own copy.
Does a template remember which language the file is?
Colour follows the filename, which keeps the decision in your hands. Save the document under the name the template was aiming at — main.py, styles.css, notes.md — and our advanced language identifier picks the language up from there, so the file comes back coloured every time you open it afterwards. Every built-in entry carries a filename alongside its menu title, so the name each one is heading for is written down for you to copy. To settle it sooner, or to choose for yourself, click the Identify pill in the status bar: the Language Inspector names the language and lets you set a different one by hand. All of it happens on your Mac, with nothing uploaded.
Can I make a template that inserts today's date every time?
Yes, that is exactly what smart tokens are for. Put the literal {{DATE}} or {{DATE_ISO}} in the template — insert it with ⌥ held so the token itself is stored rather than today's value — and it resolves each time a document is created from it.