From the course: Visual Studio Code Productivity Tips
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Expand selection with keyboard shortcuts
From the course: Visual Studio Code Productivity Tips
Expand selection with keyboard shortcuts
- [Instructor] Selecting text is a common task when editing. In this tip, let's look at the keyboard shortcuts for the grow selection and shrink selection command. The grow selection command enables us to expand our current selection incrementally. This is handy when you need to select a larger block of code or text without using the mouse. Here's how it works. I'm in a C# file. My cursor is set within the word hello in this string. The keyboard shortcut is Alt + Shift or Option + Shift, and then the left and right arrows. So, hold down Alt and Shift and tap the right arrow, and you can see that it selects the content of the string. If I tap it a second time, it increments it. So now, it's selecting the entire line of code. Not entirely though, but let's tap it one more time. You'll see, now it selects the extra space at the beginning of the line. Now, one more time expands it to the content within the curly braces, then to the curly braces, and it keeps expanding outward. To go the…
Contents
-
-
-
Explore and navigate code: Go to Definition3m 24s
-
(Locked)
Explore and navigate code: Find All References2m 21s
-
(Locked)
Explore and navigate code: Peek Definition1m 26s
-
(Locked)
Refactor the code5m
-
(Locked)
Tidy up code layout with Format Document4m 18s
-
(Locked)
Create custom keybindings for commands2m 18s
-
(Locked)
Fun with brackets and braces2m 49s
-
(Locked)
Simple technique to move code blocks52s
-
(Locked)
Use Emmet notation to quickly add boilerplate text8m 19s
-
(Locked)
Use font ligatures to add symbols to your code3m 31s
-
(Locked)
Better document tabs5m 10s
-
(Locked)
Declutter the UI2m 16s
-
(Locked)
Work with files3m 12s
-
(Locked)
Expand selection with keyboard shortcuts2m 14s
-
-