Under-used Keyboard Shortcuts for Text Editing

Most people know about the basic windows shortcuts for Cut, Copy and Paste (right?), but there are a few more shortcuts that I consider invaluable when writing text. And I was surprised that most people don’t really use them. I am talking about the Home and End keys and their respective combinations with Ctrl and/or Shift keys.

  • Home: Takes the cursor to the beginning of the current line.
  • End: Takes the cursor to the end of the current line (after the last character in the line).
  • Ctrl + Home: Takes the cursor to the very beginning of the active text field/document.
  • Ctrl + End: Takes the cursor to the very end of the active text field/document.
  • Shift + Home/End/Right/Left/Up/Down: Selects all the text between the initial cursor position and the final cursor position.
  • Ctrl + A: Selects everything in the active text field.

All coders and pretty much everyone who types a lot of text in your everyday life, for the love of God, drill these shortcuts into your minds! I promise your productivity will increase at least by 30%.

Here are a few examples:

  1. Example 1 (Ctrl + A): Say you want to post a rather long status update in Facebook and twitter. Type out your message, hit Ctrl + A, then Ctrl + C. Then hit the post button in Facebook, go to Twitter, click on the “What’s New” text box, press Ctrl + V and post it.
  2. Example 2 (Shift + Home): Say you’ve written a complex printf() statement in C to display some information and you have to repeat the same output with a few changes about 5 times. Here’s what you do: Type out the first printf() statement. Your cursor will be at the end of the line right. Now press Shift + Home. The cursor will move to the beginning of the line because of the Home key, but it will also select all the text along the way because of the Shift key. Now copy and paste it as many times as you want. You have thus successfully avoided moving your hand to the mouse, moving the cursor and selecting the text by mouse movement. You’ve achieved all that in just 2 keystrokes: Shift + Home, without taking your hand off the keyboard. Note that you can use Shift with the arrow keys to select text letter by letter.

Aside from these shortcuts, I implore you to familiarize yourself with the keyboard shortcuts of the programs you use the most. It will drastically reduce the time needed to perform simple but repetitive actions. Just use Google, because as they say, Google is your friend! And if you don’t listen, then this

Ciao!