keepcalculator

06 Numbers and Powers

Shortcuts for Extending Selections in Text Editors

Card No. 06·62153 · Updated · Standard formula, shown below

Extending a selection in any text editor means expanding the highlighted area from a single caret position to cover more characters, words, lines, or the entire document. The fastest way to do this is by holding Shift while pressing arrow keys, and adding Ctrl (Windows/Linux) or Cmd (Mac) to jump by word or line boundaries. This article covers the universal shortcuts, platform differences, and editor-specific tricks that work across most modern text editors and word processors.

Universal Selection Shortcuts

Most desktop text editors (VS Code, Sublime Text, Notepad++, Microsoft Word, Google Docs, and even basic text areas in browsers) share a core set of selection shortcuts. These are based on the standard Windows/Linux and macOS conventions.

  • Shift + Arrow Keys: Extend selection one character (left/right) or one line (up/down) at a time.
  • Ctrl/Cmd + Shift + Arrow Keys: Extend selection by word (left/right) or by paragraph (up/down). On Windows/Linux, Ctrl is used; on Mac, Cmd.
  • Shift + Home/End: Extend selection to the beginning or end of the current line.
  • Ctrl/Cmd + Shift + Home/End: Extend selection to the beginning or end of the document.
  • Ctrl/Cmd + A: Select all content in the current document or text field.

These shortcuts work in virtually every text editor, including code editors, word processors, and browser address bars. The key is to hold Shift first, then press the navigation key.

Mouse and Keyboard Combinations

If you prefer using a mouse, you can combine it with keyboard modifiers to extend selections without dragging.

  • Shift + Click: Place the caret at one end, then Shift+Click at the other end to select everything in between.
  • Double-click: Selects a single word. Hold Shift and double-click further to extend selection word by word.
  • Triple-click: Selects a paragraph (in most word processors). Shift+triple-click extends to the next paragraph.
  • Ctrl/Cmd + Click: In some editors, this selects a whole sentence or adds a new caret (multi-cursor).

These mouse shortcuts are especially useful when you need to select a large block of text that isn’t aligned to word boundaries.

Editor-Specific Shortcuts

While the core shortcuts are universal, many editors offer advanced selection features that go beyond the basics.

  • VS Code: Alt+Shift+Arrow expands/shrinks selection by word or line (depending on direction). Ctrl+D selects the next occurrence of the current selection. Ctrl+Shift+L selects all occurrences.
  • Sublime Text: Ctrl+D selects the next occurrence, Alt+F3 selects all occurrences. Ctrl+Shift+Space expands selection to the enclosing scope.
  • Notepad++: Ctrl+Shift+Arrow works as standard. Alt+Shift+Arrow allows column selection (vertical block).
  • Microsoft Word: Ctrl+Shift+F8 enters column selection mode. F8 extends selection in a special mode (press repeatedly to extend by word, sentence, paragraph, or document).
  • Google Docs: Ctrl+Shift+Arrow works as standard. Ctrl+Alt+Shift+Arrow selects to the edge of the current paragraph.

These advanced shortcuts can dramatically speed up editing tasks like renaming variables or formatting multiple lines.

Common Problems and Misconceptions

One frequent issue is that users press Ctrl+A when they only want to select a section, then lose their original selection. Another is that Shift+Arrow sometimes doesn’t work in web-based editors if the browser intercepts the shortcut (e.g., Shift+Arrow in some browsers scrolls the page instead).

A common misconception is that you need to select text before applying a style or command. In many editors, you can apply a command with the caret inside a word, and the editor will automatically select the whole word (e.g., bold in Word).

Another problem: on Mac, the Home and End keys may not exist on laptop keyboards. Use Cmd+Left/Right instead, and Cmd+Shift+Left/Right to extend selection to line start/end.

How to Choose the Right Shortcut

Choosing the right selection shortcut depends on the size of the selection and the structure of your text.

  • For a single word: double-click or Ctrl/Cmd+Shift+Right/Left.
  • For a line: Home then Shift+End, or triple-click in many word processors.
  • For a paragraph: triple-click or Ctrl/Cmd+Shift+Up/Down.
  • For a large block: click at start, scroll, Shift+Click at end.
  • For multiple non-contiguous sections: use multi-cursor (Ctrl/Cmd+Click) in code editors.

If you’re editing code, learning the “select next occurrence” shortcuts (Ctrl+D in VS Code and Sublime) is often more efficient than manual selection.

Frequently Asked Questions

Why doesn’t Shift+Arrow work in my browser?

Some web apps (like Gmail or certain text areas) override the default browser behavior. Try using the mouse or check if the app has its own shortcut list. In most cases, the shortcut works in the main text area, but not in custom UI elements.

How do I select a column of text vertically?

Hold Alt (Windows) or Option (Mac) while dragging the mouse. This works in Notepad++, VS Code, Sublime, and many other editors. In Word, use Ctrl+Shift+F8 then arrow keys.

What’s the fastest way to select all text in a document?

Press Ctrl+A (Windows/Linux) or Cmd+A (Mac). This is universal across almost every program.

How do I select multiple words that aren’t adjacent?

In code editors, use multi-cursor: hold Ctrl (Windows/Linux) or Cmd (Mac) and click each location. Then you can type or edit all at once. In word processors, this isn’t standard; you may need to use find-and-replace.

Is there a way to extend selection by sentence?

In Microsoft Word, press F8 once to enter extend mode, then press F8 again to select a word, again for a sentence, again for a paragraph. In other editors, there’s no universal sentence shortcut; you can use regex find or manual selection.

Does the Shift key have to be held before pressing the arrow?

Yes, hold Shift down first, then press the arrow key. If you press the arrow first and then Shift, you’ll just move the caret without selecting. This is a common mistake.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →