Learn CSS Visually! Every single CSS property visualized in this pictorial CSS guide book!
⭐⭐⭐⭐ and 1/2⭐ - owned by over 27.1K readers.
Get this CSS book in PDF format, on Amazon or start reading this css book on your Kindle device today!
Shrink or Expand Text Selection (VS Code Keyboard Shortcut)
First, check out this video, explaining how shrink and expand selection works in vscode:
VSCode Keyboard Shortcut: How to Shrink or Expand Text Selection
Platform | Shortcut |
---|---|
Windows | Shift + Alt then left or right key. |
Mac | shift + control then left or right key. |
It's possible to expand text selection around words and even nearest nested function scopes.
If you already have a selection, oftentimes, your next step is to select the scope of the function your selection or cursor is currently in.
This is helpful when you already have text selected but don't want to click mouse and drag a new selection.
Note: This shortcut will intuitively lock into nested scopes as you expand or shrink the selection.
It takes some time to get used to!
This shortcut allows you to either expand or shrink selection around natural block scope checkpoints (see animation above.)
On Windows, hold Shift + Alt and use keyboard left and right arrows. On Mac it's shift + control and the arrows. Left arrow shrinks selection, right arrow expands it.
It will stop at key points in your JavaScript block scopes. It will also stop at CSS style scopes and be mindful of opening and closing HTML tags. It helps you to intuitively do what you would have done using the mouse, which saves a lot of time if you develop a habit for using it.
11 Useful VSCode Keyboard Shortcuts
Want to learn more useful VSCode Keyboard Shortucts? Click on image below!
(Clear, animated examples are included.)
Final Words
Many visual studio code keyboard shortcuts and key bindings are obvious whether you're on Windows 10, Mac or Linux - they are part of the standard set of shortcuts offered by many other text editors and IDEs.
But not all vscode shortcuts are useful, and some are hard to discover or guess. This guide focused on some of the less known but extremely helpful vs code keyboard shortcuts.
Hopefully this tutorial helped you discover at least one new favorite shortcut!
What If VS Code Shrink Selection Is Not Working On Mac OS X?
- If, like me, you use keyboard shortcuts in most of your editors, IDE's, and other productivity apps, make sure you don't have another application overriding your VSCode's shrink shortcut key combination.
- You might be shrinking a code block that isn't shrinkable. At least not right away. (Some blocks of code have deeper shrink hierarchy that isn't obvious at first. Try to shrink multiple times.
- Make sure you have the latest version of Visual Studio Code installed.
Learn CSS Visually! Every single CSS property visualized in this pictorial CSS guide book!
⭐⭐⭐⭐ and 1/2⭐ - owned by over 27.1K readers.
Get this CSS book in PDF format, on Amazon or start reading this css book on your Kindle device today!
Articles Related To Undefined Community
- DaVinci Resolve 18: How To Brighten Video Clip on 23 Dec 2022 by Ghost Together
- How To Fade Out In DaVinci Resolve (Fade In To and From Black) on 20 Dec 2022 by Ghost Together
- How To Animate Zoom Effect In DaVinci Resolve 18 on 20 Dec 2022 by Ghost Together
- Zoom In On Video Clip In Davinci Resolve 18 on 18 Dec 2022 by Ghost Together
- asdasdasdasdasd on 10 Dec 2022 by Ghost Together
- How to Install MinGW w64 64-bit on Windows (C/C++ Compiler) on 3 Nov 2022 by Ghost Together
- How To Crop Video In Premiere Pro on 20 Sep 2022 by Ghost Together
- DIY Life, Love, and Violence -- Taking it to the Streets on 9 Sep 2022 by A. Stranger
- How To Change Font Size In VSCode (Visual Studio Code) on 29 Jul 2022 by Ghost Together
- How To Fix MinGW File Downloaded Incorrectly on 30 Jul 2022 by Ghost Together
Last 10 Articles Written On Ghost Together
- sdgsd on 29 Apr 2024 by Await974
- Usage of List.Contains function in M Language on 25 Apr 2024 by Layout965
- The engineer's theoretical revision on 18 Apr 2024 by Semicolon512
- The engineer's theoretical revision on 18 Apr 2024 by Semicolon512
- How To Use Chat GPT4 For Writing on 15 Apr 2024 by Ghost Together
- How To Use Chat GPT For Lawyers And Legal Work on 15 Apr 2024 by Ghost Together
- How To Use GPT-4 for Language Translation on 15 Apr 2024 by Ghost Together
- Heloo World on 10 Apr 2024 by Code17
- Free GPT4 For Lawyers, Legal Practice and Case Research on 5 Apr 2024 by Ghost Together
- Is There a Free GPT Platform For Data Analysis on 5 Apr 2024 by Ghost Together
Last 10 Undefined Questions Asked On Ghost Overflow
- Ask your first Undefined question! (Help us build the largest database of questions on any subject)