#TIL Selecting a Rectangle Range of Text and Other Keyboard Shortcuts I Didn't Know

This is one of those things that I knew existed for a long time, but didn’t actually spend the effort learning how to do it – selecting a “rectangle” area of text for editing in a text editor.

In SQL Server Management Studio, you can hold Alt+Shift, and then start moving the arrow keys, to select that rectangle range. Once it’s selected, you can start typing, deleting things, etc. to get the result you want (or even us a Find & Replace in Selection operation).

In fact, here’s a few other keyboard shortcuts you may not know about to help speed up your keyboarding.

  • Alt + Shift + arrow key – Select rectangle range
  • Alt + Shift + Home / End – Select rectangle range from current position to start / end of line
  • Ctrl + Alt + Shift + Left/Right Arrow – Select the next / previous word, appending to the column selection
  • Ctrl + Right / Left Arrow – Move cursor to next word
  • Ctrl + W – Select current word
  • Ctrl + = – Select between current cursor location and previous cursor location

  • Ctrl + Enter – Add a new line above the cursor

  • Ctrl + Shift + L – Change selected text to lowercase
  • Ctrl + Shift + U – Change selected text to uppercase
  • Ctrl + Delete – Delete word to left of cursor
  • Ctrl + Backspace – Delete word to right of cursor
  • Alt + Shift + T – Swap the current line with the line below it

  • Ctrl + Shift + V – Insert from the clipboard, and select the inserted text

Note that these shortcuts may be different in the text editor you use, or may not even exist!

Comments