Android
Android Studio
HTML
CSS
Git
SVG
JavaScript
Python
React
Node.js
Express
WebGL
PHP
Mac
Mongo
Crypto
VSCode
Premiere
Recipe
Flutter
React
Web Development
Windows
Vscode Tutorials
    Just Another Ghost  @jst
    Writer at Learning Curve and generally just another ghost! Born of a earth and dust to create. Sooner or later everything we make will be destroyed.

    Learn CSS Visually! Every single CSS property visualized in this pictorial CSS guide book!

    best css book for beginner web developers

    ⭐⭐⭐⭐ 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)

    Viewed
    941 times
    semicolon@jst › tutorial › vscode › expand selection vscode keyboard shortcut › Sun Mar 27

    First, check out this video, explaining how shrink and expand selection works in vscode:

    VSCode Keyboard Shortcut: How to Shrink or Expand Text Selection

    Get Ghost Messenger
    Sign Up Now  -  It's Free!
    PlatformShortcut
    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!

    shrink or expand selection

    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!

    VSCode Keyboard Shortcuts

    (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 IDE­s.

    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?

    1. 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.
    2. 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.
    3. 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!

    best css book for beginner web developers

    ⭐⭐⭐⭐ 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!

    Get Ghost Messenger
    Sign Up Now  -  It's Free!
    Write For Us
    Sign Up Now  -  It's Free!
    © 2021
    DM Coming Soon
    f f