brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: Control-A, Control-E and Control-K edit lines in any Mac text field

macOS
~/tips/tip-macos-control-a-e-k-y-text-keys

Control-A move to the beginning of the line or paragraph

Move to the start or end of a line and cut the rest of it from the keyboard.

If you know bash, you know these keys from the command line. What I like is that macOS supports them in normal text fields too, in Notes, Mail, TextEdit and most other apps.

Apple lists them with the other text editing shortcuts:

Control-A   move to the beginning of the line or paragraph
Control-E   move to the end of the line or paragraph
Control-K   cut from the cursor to the end of the paragraph
Control-Y   paste what Control-K cut
Control-T   swap the two characters around the cursor

Control-A and Control-E save a trip to the mouse when you want to add something at the start or end of a line. Control-K plus Control-Y is a quick way to move the end of a sentence somewhere else.

An example: you typed a subject line in Mail and want to drop everything after the cursor. Press Control-K and it’s gone. Changed your mind? Control-Y puts it back.

Control-K doesn’t use your normal clipboard. Apple says it copies to a clipboard that is only available in the app where you cut the text, so Command-V won’t paste it and another app can’t see it. That’s handy, because whatever you copied with Command-C stays intact. Apple also warns that these shortcuts may behave differently in some apps, and editors with their own key bindings can override them.

Further reading: Mac keyboard shortcuts (Apple Support)

More macOS tips System Settings > Accessibility > Hover Text > When using the pointer A Smart Folder in Notes collects notes by tag, checklist or date Type # in a Mac note to tag it, then filter by tag in the sidebar tmutil isexcluded ~/Projects/app/node_modules Crop an image in Preview by dragging a frame and clicking Crop All macOS tips (99) All topics

Link