Guides

Editing text and code on a Mac

Practical answers to the things people actually need to do with text on a Mac — each one written against the shipping app and tested end to end.

Start Here

Big Files & Logs

Writing Code

How to view code syntax on a Mac

Open a source file on a Mac and read it in colour straight away — what each colour marks, which languages are covered, and how to keep the colours when you print.

10 min read

Syntax highlighting not working on Mac

A file opened as flat, uncoloured text — here is what the status bar is telling you, what the language setting controls, and how to set it yourself.

7 min read

How to change a file's syntax language on Mac

Override the language on any file, or set one on a brand-new document, using the Identify pill and the Language Inspector.

7 min read

Which languages get syntax colouring

The fifteen code languages that get syntax colouring, what each one gets beyond colour, and how to put any file into the right language yourself.

7 min read

How to get code completion on Mac

Suggestions as you type, or on demand with a keystroke — how to open the list, how to accept a row, and what to do when nothing appears.

9 min read

How to see function parameters while typing on Mac

A call tip shows the signature with the argument you are on picked out — how one arrives while you type, and how to call it up whenever you want it.

7 min read

How to autocomplete file paths on Mac

Let the editor finish the long project paths you keep retyping into config files and scripts, and memorise the ones you reuse everywhere.

7 min read

How to turn off code autocomplete on Mac

Switch the suggestion popup off, or keep the useful half of it — every switch, what you keep afterwards, and how to clear what the editor has learned.

7 min read

How to collapse code blocks on Mac

Double-click a brace and everything between it and its partner folds away — plus the three ways to bring it back, and how to read a file by its shape.

6 min read

How to highlight all occurrences of a word on Mac

Double-click an identifier and every other use of it in the file lights up — whole words only, in any script, and never written into your document.

8 min read

How to edit a Python file on a Mac

Open a .py file in a native Mac editor with Python colouring, suggestions that carry their own import line, and call tips while you write.

10 min read

How to open a Swift file on a Mac

Read and edit a .swift file in a light editor — colouring, completion that brings the import line with it, call tips and folding, with no project to set up.

9 min read

How to edit a JavaScript file on Mac

What a native Mac editor gives you on a .js file — colouring that holds template literals together, six kinds of suggestion in one list, auto-import and call tips.

10 min read

Formatting & Indentation

How to re-indent code on Mac

Put a whole source file back at the right depths in one pass — where the Indentation sheet lives, what Apply changes, and how to tune it for your language.

9 min read

How to fix pasted code formatting on Mac

Code that arrived as one run-together line, put back into readable blocks — statements split apart, depth restored, and the invisible junk cleared out.

7 min read

How to change tab size and indent width on Mac

Set the indent width, choose tabs or spaces per language, and match any project's house style in a couple of clicks.

7 min read

How to auto-indent code on Mac

Make Return carry your indentation down and open a new level inside a block — and keep exactly the parts of smart typing that suit the way you write.

7 min read

How to auto-close brackets and quotes on Mac

The six pairs that close themselves as you type, how to step over a closer instead of doubling it, and how to switch any of it off.

8 min read

How to auto-close HTML tags on Mac

Type the closing angle bracket and the matching closing tag appears — where the switches live, how void elements come out, and how to set a file to HTML.

7 min read

How to fix mixed tabs and spaces on Mac

See exactly which lines mix tab and space characters in their indentation, get a list of every one of them, then re-indent the file to one consistent unit.

10 min read

How to show indentation guides on Mac

Vertical markers down every level of nesting, in any of ten styles — where the toggle lives, which style to pick, and why your file stays exactly as you wrote it.

6 min read

Formatting by Language

How to indent Swift code on Mac

Re-indent a whole Swift file in one pass, set the brace style and width once, and see exactly which Swift settings stick.

8 min read

Fix Python indentation on a Mac

Set Python to four spaces, see the tabs hiding in the file, and re-indent the whole document in one pass from the toolbar Indent button.

8 min read

How to format JavaScript code on Mac

Re-indent a JavaScript file in one pass — brace style, indent width, trailing commas and semicolons — and unpack the statements that share a line.

8 min read

How to indent Java code on Mac

Re-indent a whole .java file in one pass, and set the three things Java arguments are actually about: brace placement, case labels and annotations.

7 min read

How to indent C and C++ code on Mac

Which control re-indents a C or C++ file on a Mac, what each of the C and C++ options actually changes, and how to make a whole file agree in one pass.

8 min read

How to indent Go code on Mac

Go is the one language Note My locks to hard tabs, and the lock is on by default — here is what the re-indent pass changes and what it leaves alone.

7 min read

How to indent Rust code on Mac

Four-space blocks, same-line braces and trailing commas on match arms — what one re-indent pass changes in a .rs file, and what it keeps exactly as you wrote it.

7 min read

How to indent PHP code on Mac

Re-indent a PHP file to your house brace style in one pass, with every heredoc left exactly as you wrote it and four-space PSR-12 spacing straight out of the box.

9 min read

How to indent Ruby code on Mac

Ruby is written in two spaces and the editor defaults to four — here is where to change that, plus the block-style and hash-rocket controls the sheet adds for Ruby.

7 min read

How to format a bash script on Mac

Re-indent bash, sh and zsh consistently, keep heredoc bodies untouched, and find the invisible characters that stop a correct-looking script from running.

7 min read

How to format CSS code on Mac

Re-indent a stylesheet with the brace style and width you want, and set the language yourself on the days a CSS file opens as plain text.

8 min read

How to format HTML code on Mac

Re-indent a collapsed or ragged HTML file in one pass, keep pre blocks exactly as written, and format the script and style content inside the page.

8 min read

Cleaning Text

How to remove invisible characters on Mac

Find every hidden character in a file, see the line, column and code point of each one, and delete the ones that are safe to delete without touching a visible word.

9 min read

How to remove zero-width spaces on Mac

Find every zero-width space, joiner and word joiner in a file, see exactly where each one sits, and remove the lot in a single undoable pass.

6 min read

How to remove hidden characters from AI text on Mac

One command strips the invisible markers that travel with text pasted out of an AI chat, without rewriting a single word, dash or emoji.

8 min read

Convert smart quotes to straight quotes on Mac

Curly quotes, en and em dashes and the ellipsis character, found and flattened to plain ASCII — with every match listed for you before a single one changes.

7 min read

How to remove non-breaking spaces on Mac

Find every non-breaking, narrow, ideographic and unusual Unicode space in a file and turn it into an ordinary space, in one pass you can undo.

8 min read

How to show invisible characters on Mac

Draw spaces, tabs and line endings on screen so you can see what is actually in the file — without changing a single byte of it.

7 min read

How to remove trailing whitespace on Mac

Show the spaces and tabs sitting at the ends of your lines, then strip them in one undoable pass — with the two places your text is protected on purpose.

8 min read

How to remove control characters on Mac

Strip NUL bytes, escape codes and other non-printable control characters out of a log or export, without disturbing the tabs and line breaks you need.

8 min read

How to find homoglyph characters on Mac

Locate the Cyrillic and Greek letters standing in for Latin ones in an identifier, read the exact code point of each, and correct them without a blind search and replace.

9 min read

How to find bidi control characters on Mac

Direction-control code points can make a line of source read one way and compile another — here is how to scan a file for them, see each one, and take them out.

9 min read

How to clean text copied from a PDF on a Mac

Soft hyphens, no-break spaces and stray line breaks come across with the words — here is how to find them, remove them, and leave the wording alone.

9 min read

Custom text cleanup rules on Mac

Write your own regex cleanup rules, count their matches before you run them, sweep a document in one undoable pass, and export the set as JSON.

8 min read

How to fix decomposed accents on a Mac

Two words that look identical but never compare equal, explained — how to see whether an accent is composed or decomposed, and how to normalise it.

7 min read

Finding & Comparing

How to find and replace text on Mac

Swap one string for another in the file you are looking at — where the controls are, what each of the seven buttons does, and what the beep means.

8 min read

Regex find and replace on Mac

The syntax you can type, capture groups and the $1 replacement template, what the three checkboxes change about a search, and how to scope a sweep safely.

9 min read

How to search for text in files on Mac

Search every text file under a folder for a string, read the matches grouped by file, and open any one of them at the line it was found on.

8 min read

How to replace text in all open tabs on Mac

One action that rewrites the same string in every document you have open — with the live match count in front of you first, and the whole sweep paced so you can watch it land.

8 min read

How to compare two files on a Mac

Put two documents side by side, see every differing line and character marked in the text itself, and leave the comparison with one key.

8 min read

Delete or copy every line containing a word

Mark every line that matches a word or a pattern, then lift those lines out to the clipboard or delete them in one move — without leaving the editor.

7 min read

How to go to a line number on Mac

A compiler, a linter or a stack trace hands you a line number — here is how to land on that line, and how to find the number when nothing has told you.

7 min read

How to bookmark lines in a text file on Mac

Mark the lines you care about, step between them with two keys, and act on the whole set at once — without scrolling or running the same search again.

7 min read

How to record a macro in a text editor on Mac

Have the editor watch you make a repetitive edit once, then replay it across a line, a whole file or every open tab — and undo the lot in one step.

8 min read

How to repeat the same edit many times on Mac

Record an edit once, then replay it up to 9,999 times across one tab or every open tab — with a confirmation, a cancel key and a single undo.

7 min read

Files, Encodings & Formats

How to fix garbled characters in a text file on Mac

A file full of Ã, Â or question marks is almost never damaged — it is being read with the wrong encoding, and re-reading it is one menu away.

8 min read

How to convert a file to UTF-8 on Mac

Re-encode a file that reads correctly but is stored wrong — and the one distinction, convert versus reload, that decides which command you need.

7 min read

How to convert CRLF to LF on Mac

See whether a file holds LF, CRLF, CR or a mixture of two, convert the whole document in one step, and control what gets written the next time you save.

7 min read

How to remove a byte order mark on Mac

A leading byte order mark breaks scripts and parsers, and a stray one mid-file is worse. How to see U+FEFF, remove it, and save the file without one.

9 min read

How to format JSON on a Mac

Turn a squashed one-line JSON blob into two-space indented, readable text — on your own Mac, with the one behaviour you should know about first.

7 min read

Validate JSON and find the syntax error on Mac

Get the line and column that broke a JSON file, on your own Mac, without pasting your configuration into a web form.

6 min read

How to format XML on a Mac

Pretty-print an unreadable XML document or collapse it back down, in two Edit-menu commands that leave the file alone when the markup is broken.

7 min read

How to open any file as text on Mac

Force open a file macOS will not hand to a text editor — no extension, an unfamiliar one, or a type the system calls binary — and read what is inside it.

8 min read

How to open and edit a CSV file on Mac

Open a CSV in Note My and see exactly what is in the file — no reformatted dates, no dropped leading zeros, and no size at which it stops opening.

9 min read

How to create a file from a template on Mac

Forty built-in starter files — READMEs, licences, configs and language starters — with the year, your name and the project name already filled in for you.

7 min read

How to save your own file template on Mac

Turn the document you keep retyping into a reusable starting point, with tokens that fill in the date, the year and your name for you.

8 min read

How to create a README file on Mac

Start a README, a licence, a CHANGELOG or a .gitignore from a ready-made template, with the year and your name already filled in.

7 min read

How to insert the date automatically on Mac

Drop today's date, the filename, your name or a fresh UUID into a file from a menu instead of typing it, using the editor's fourteen smart tokens.

8 min read

Recovery & Sessions

How to recover an unsaved file on Mac

What actually survives a crash or a force quit, how your tabs come back at the next launch, and what to check the moment they do.

8 min read

How to close a tab without losing work on Mac

What is still recoverable after you close a tab — including the five seconds you get back after clicking Don't Save, and what that Restore button really returns.

6 min read

What autosave protects on a Mac

What is protecting your typing before you press Save, what the star on a tab is telling you, why it is always on, and how your session comes back after an unexpected quit.

7 min read

How to restore your previous session on Mac

What comes back when you relaunch — the tabs, their order, the selected one and the text you never saved — and how to pick up exactly where you were.

6 min read

What to do when a file changes on disk on Mac

A sheet says the file changed underneath you and offers two buttons — here is exactly what Reload and Keep My Version each do to your work.

7 min read

How to auto-reload a file when it changes on Mac

Ask, Auto-Reload or Never — where the switches live, why logs refresh themselves, and the one conflict that always stops to ask you first.

8 min read

What to do when a file is deleted while open on Mac

The file under an open tab has gone — trashed, moved, or wiped by a checkout. What the editor asks you, and how to get your text back onto disk.

9 min read

What the asterisk on a file tab means

The leading star means unsaved text; the orange dot means the file changed on disk — two markers with two different answers before you close a tab.

8 min read

Working on a Mac

How to open a file from the Finder on Mac

Every route from a Finder selection into the editor — the right-click submenu, the Services menu, a drag onto the tab bar — without an Open dialog.

7 min read

Finder extension not showing on Mac

The right-click submenu waits until macOS says otherwise — how to switch it on, everything it adds, and how to make it your quickest route into a file.

6 min read

How to copy a file path on Mac

Get a path, a relative path, a folder path, a filename or a file's whole text onto the clipboard — from the Finder's right-click menu or from the editor.

6 min read

How to copy code as a Markdown code block on Mac

Right-click a file in the Finder and put its contents on the clipboard already fenced — with the file's path above it, if the person reading needs to know where it came from.

6 min read

How to create a new file in a folder on Mac

Right-click inside a folder and get a real file there — empty, from a template, or from the clipboard — without opening the Terminal first.

6 min read

How to open a file from Terminal on a Mac

The open command, the notemy:// scheme and its three verbs — every supported way to hand a file to the editor from a shell script or a build step.

7 min read

How to rename an open file on Mac

Two rename commands with similar names and different jobs — which one touches the disk, which one can move the file, and what each does with unsaved edits.

7 min read

How to save a copy of a file on Mac

Duplicate a tab, duplicate the file on disk, or write a copy and carry on in the original — and which save command quietly moves you onto the new file.

8 min read

How to open multiple files in tabs on Mac

Open a working set of files at once, drag them in from the Finder, pin the ones you cannot afford to lose, and read every marker on the tab bar.

7 min read

How to view two files side by side on Mac

One pane per open tab, in one window — how to set it up, how to rearrange the panes, and when you want Compare instead.

7 min read

How to close all tabs at once on Mac

Five ways to clear a window full of tabs — including the one that asks a single question instead of one question per unsaved file.

7 min read

How to print code with line numbers on Mac

Line numbers in the margin, a light theme on white paper, and long lines wrapped rather than clipped — with every option and its default.

6 min read

Export code to PDF with syntax highlighting

A source file as a PDF that still reads like code — where the export lives, what lands on the page, and when printing to PDF is the better route.

6 min read

Export code to HTML with syntax highlighting

A source file as a self-contained HTML page with its colours intact — plus the RTF route for documents and slides, and the two clipboard commands that send coloured code straight into a chat or an issue.

8 min read

Mac text editor settings

Fourteen panes, one search field, and two settings that keep a place of their own on the toolbar — a map of the Settings window and the fastest route through it.

7 min read

Accessible text editor for Mac

What VoiceOver, Reduce Motion and Increase Contrast get in Note My, the nineteen toolbar names in bar order, and the gestures and shortcuts that drive them.

9 min read