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.
Via: Stack Exchange.