Handy text editing shortcuts for Mac
While they’re not exactly well documented to I came across them in the Mac OS X Productivity Tips for Developers course from O’Reilly to these keyboard shortcuts are very handy (and not just for developers). They’ll work across all kinds of applications: Pages, PhpStorm, Sublime Text, browsers, the Terminal. I should point out that they’ll sometimes (not often) be overridden by a specific application, which is a bit of a shame, but they work pretty well the platform.
The shortcuts
Navigation on a line of text
- ctrl + a jumps the cursor to the beginning of the line
- ctrl + e jumps the cursor to the end of the line
- esc , b jumps the cursor back one word
Deleting what’s on either side of the cursor
- ctrl + u deletes from the cursor to the beginning of the line
- ctrl + k deletes from the cursor to the end of the line
- ctrl + w deletes the word to the left of the cursor (Note: this doesn’t seem to work on Safari).
Transposing letters
- ctrl + t transposes the two letters around the cursor
Hope these are helpful to let me know if you know of any others.