Text editing shortcuts that work in almost every Mac app

The text editing shortcuts that work almost everywhere on a Mac are built around the arrow keys. Option-Left and Option-Right (⌥← ⌥→) jump a word at a time, Command-Left and Command-Right (⌘← ⌘→) go to the start or end of the line, and Command-Up and Command-Down (⌘↑ ⌘↓) go to the top or bottom of the document. Add Shift to any of them to select instead of move, and add Option to Delete to erase a whole word.

They work so widely because they belong to macOS’s own text system, not to each app. TextEdit, Notes, Mail, Safari’s address bar, the search field in Finder and the text boxes on most websites all get them for free. Learn them once and every app gets faster.

Moving the insertion point

Keys Moves to
⌥← and ⌥→ The previous or next word
⌘← and ⌘→ The start or end of the line
⌘↑ and ⌘↓ The start or end of the document
⌥↑ and ⌥↓ The start or end of the paragraph
⌃A and ⌃E The start or end of the paragraph

Two details are worth knowing. Command-Left goes to the start of the line as you see it on screen, so in a long paragraph that wraps, it stops at the wrap. Control-A goes to the start of the whole paragraph, however many lines it wraps across. And Option-Up keeps going: press it again at the start of a paragraph and it moves to the start of the one before.

Selecting text

Hold Shift with any movement shortcut and the selection grows in that direction instead of the insertion point moving.

  • Shift-Option-Right (⇧⌥→) selects the next word. Press it again to add another.
  • Shift-Command-Left (⇧⌘←) selects back to the start of the line.
  • Shift-Command-Down (⇧⌘↓) selects everything from here to the end of the document.
  • Shift-Option-Down (⇧⌥↓) selects to the end of the paragraph.

The mouse has its own set. Double-click selects a word, triple-click selects a paragraph, and Shift-click extends the current selection to wherever you click. In TextEdit, holding Option while you drag selects a rectangle of text rather than whole lines, which is handy for columns.

Deleting

Keys Deletes
Delete The character before the insertion point
⌥Delete The word before
⌘Delete Everything back to the start of the line
fn-Delete The character after
fn-⌥Delete The word after
⌃K Everything to the end of the paragraph

Mac laptops have no Forward Delete key, so fn-Delete stands in for it. The keys a MacBook leaves out: Home, End, Page Up, Forward Delete covers the rest of the missing keys.

Control-K is the odd one, and the most useful. It cuts from the insertion point to the end of the paragraph and keeps the text in a buffer of its own, separate from the clipboard. Control-Y puts it back. So you can Control-K a sentence, move somewhere else and Control-Y it there, without losing whatever you had copied.

One caution: Command-Delete means something else outside a text field. In Finder it moves the selected file to the Trash.

The Control-key set

Control-A, Control-E and Control-K come from a set of bindings borrowed from the Emacs editor, and macOS supports the rest of the set in its text fields too. Your hands never leave the letter keys.

  • Control-F and Control-B: forward and back one character.
  • Control-N and Control-P: down and up one line.
  • Control-D: delete the character after the insertion point.
  • Control-H: delete the character before it.
  • Control-T: swap the two characters either side of the insertion point. Ideal for “teh”.
  • Control-O: insert a line break after the insertion point, leaving it where it is.

The same keys work at the command line in Terminal, with some differences, which is why many developers know them already. Terminal shortcuts on a Mac: move around the command line fast covers that side.

The Edit menu shortcuts every app shares

These live in the Edit menu, so you can always look them up there:

  • Command-Z undoes, Shift-Command-Z redoes.
  • Command-A selects all; Command-X, Command-C and Command-V cut, copy and paste.
  • Option-Shift-Command-V (⌥⇧⌘V) is Paste and Match Style in Apple’s apps, which pastes text without its fonts and colors.
  • Command-F finds, Command-G finds the next match, Shift-Command-G the previous one.
  • Command-E puts the selected text into the Find field without opening it, so Command-G can jump straight to the next copy.
  • Control-Command-Space opens Emoji & Symbols.

In TextEdit and other apps built on Apple’s text system, Option-Escape shows a list of words that complete the one you are typing.

Where they do not work

“Almost every app” has some exceptions:

  • Terminal and other command lines. The shell has its own key handling. The Control-key set mostly works, and Terminal’s default settings make Option-Left and Option-Right jump a word, but most other arrow combinations and Shift selection do nothing at the prompt.
  • Control with the arrow keys. In a text view, Control-Left and Control-Right would also go to the start or end of the line, but macOS uses them to move between Spaces, so they never reach the app.
  • Home and End. On Apple’s text views, Home and End (fn-Left and fn-Right on a laptop) scroll to the top or bottom without moving the insertion point. Use Command-Up and Command-Down to move it.
  • Some cross-platform apps and web editors. Apps that draw their own text, rather than using the Mac’s, may support the arrow shortcuts and skip the Control-key set, or the other way round.

If you want to change these bindings for every app at once, macOS reads a file at ~/Library/KeyBindings/DefaultKeyBinding.dict. It is a power-user corner, and a typo there quietly does nothing, but it is how people add the bindings they miss.

Showing them in a tutorial

The moving, selecting and deleting shortcuts appear in no menu, which is exactly why viewers miss them. You press Option-Shift-Right three times, a sentence turns blue, and nothing on screen says how.

Typebar shows every key you press on an on-screen keyboard, and its keystroke pill shows each combination as keycaps. A shortcut pressed again counts up as ×2, ×3 rather than filling the pill with repeats, so a viewer can tell you pressed it three times, not once. If you are learning these yourself, How to learn Mac keyboard shortcuts and actually remember them has the habit that makes them stick.

Typebar costs $9 once for up to 5 Macs, with a free 24-hour trial.

Questions

How do I jump to the start or end of a line on a Mac?

Command-Left Arrow and Command-Right Arrow. Control-A and Control-E do the same for the whole paragraph.

How do I delete a whole word?

Option-Delete deletes the word before the insertion point. Add fn, as fn-Option-Delete, to delete the word after it.

Why does Home not move the cursor on a Mac?

In Apple’s text views, Home and End scroll the document without moving the insertion point. Command-Up Arrow and Command-Down Arrow move it to the top or bottom.

Do these shortcuts work in apps not made by Apple?

In most Mac apps, yes, because they use the system’s text fields. Apps that draw their own text, such as some office suites and web-based editors, usually keep the word and line shortcuts but may differ on the rest, so check their help pages.