Use These Emacs Legacy Keyboard Shortcuts To Move Around In Your Text Files [OS X Tips]

Mac OS X Keyboard

When you’re writing up a long document, or even in the middle of a simple one, it’s good to be able to move around and edit in the text without taking your hands off the keyboard. All the little switches from keyboard to mouse and back again take up valuable time, and–perhaps more importantly–force you to change the way your brain is processing information.

Using the arrow keys is a good way to move the cursor around, and of course there are the standard Command key shortcuts, but did you know that there’s some legacy keyboard shortcuts that come to us all the way back in Emacs, a popular text editing program for Unix, the operating system Mac OS X is based?

There are, and here are a few good ones. I’ve tested them in Text Edit, but chances are several Mac text editing programs will take advantage of these.

If you’re in the middle of a line of text and you want the cursor to move back to the beginning of that line, simply hit Control-A to move your cursor to the beginning of the line. To get to the end of the current line, just hit Control-E.

Want to delete everything after the cursor, through to the end of the current line? Try Control-K. To transpose the two characters on either side of the cursor, hit Control-T.

If you want to move back and forth by character, use Control-F to go forward, and Control-B to go back. To move by word, simply add in the Option key, with Control-Option-F to move forward by word, and Control-Option-B to move back by word.

To delete the character to the right of your cursor, hit Control-D, and to delete the character to the left of your cursor, just hit Delete (grin). To delete an entire word to the left, hit Option-Delete.

  • thweisbach

    Control-W doesn’t work in Text Edit for me, but it works in Terminal.

  • blamrob

    I was hoping that after they added the ability resize a window from any edge, the next thing on the agenda would be to standardize “Home” and “End” to go to the beginning and ending of a line.

About the author

Rob LeFebvreAnchorage, Alaska-based freelance writer and editor Rob LeFebvre is Cult of Mac's Culture Editor. He has contributed to various tech, gaming and iOS sites, including 148Apps, VentureBeat, and Paste Magazine. Feel free to find Rob on Twitter @roblef

(sorry, you need Javascript to see this e-mail address)| Read more posts by .

Posted in OS X, Tips & Tricks | Tagged: , , , |