Everyday we select code to act on it; maybe we want to comment it, copy/cut/paste it, or extract it to a method. Within the Edit category of Visual Studio keyboard shortcuts, selecting code is a precursor to many of the others. So let’s learn to extend selection without using the mouse. These shortcuts are even more useful when combined with each other.

Bonus: these shortcuts work throughout the OS; try them anywhere there is text input.

Character Right Extend: Shift + Right Arrow
Character Left Extend: Shift + Left Arrow

character extend gif

Line End Extend: Shift + End
Line Start Extend: Shift + Home

line start end extend gif

Word Next Extend: Ctrl + Shift + Right Arrow
Word Previous Extend: Ctrl + Shift + Left Arrow

word next previous extend gif

Line Up Extend: Shift + Up Arrow
Line Down Extend: Shift + Down Arrow

line up down extend gif