IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Reassign Shortcut Key for Column Selection in Visual Studio Code

If you use column selection often in Visual Studio Code, you may find the default shortcut keys combination is a bit too much. By default, to make a column selection or multiple lines in the same horizontal cursor position, you need to press CTRL-SHIFT-ALT and either UP or DOWN arrow depending on the direction of your selections.

Fortunately, you can always assign your own shortcut keys for virtually any functions in this powerful code editor.

So here are the steps to do so.

  1. From the top menu, select File -> Preferences -> Keyboard Shortcuts (or press a combination of CTRL-K CTRL-S) to open the Keyboard Shortcuts windows.

    Visual Studio Code Preferences

  2. Within Keyboard Shorcuts window, look for the following:

     
    cursorColumnSelectDown
    cursorColumnSelectUp
    cursorColumnSelectPageDown
    cursorColumnSelectPageUp
    
  3. Right-click and select Change Keybinding (CTRL-K CTRL-K) and press the key combination you want to use and press ENTER to save it or ESCAPE to cancel. In this example, I use a keyboard combination SHIFT-ALT-ARROW. Repeat this step for each operation.

  4. Once completed, you should see something similar to the screenshot below in your Keyboard Shortcuts window.

    Visual Studio Code Keyboard Shortcuts

That’s it.

If you want to see the configuration in JSON format, you can click on the active link keybindings.json on the top of the Keyboard Shortcuts window (For advanced customizations open and edit keybindings.json), then you’ll see the JavaScript Object Notation that looks similar to the following:

// Place your key bindings in this file to overwrite the defaults
[
    {
        "key": "shift+alt+down",
        "command": "cursorColumnSelectDown",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+shift+alt+down",
        "command": "-cursorColumnSelectDown",
        "when": "editorTextFocus"
    },
    {
        "key": "shift+alt+up",
        "command": "cursorColumnSelectUp",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+shift+alt+up",
        "command": "-cursorColumnSelectUp",
        "when": "editorTextFocus"
    },
    {
        "key": "shift+alt+pagedown",
        "command": "cursorColumnSelectPageDown",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+shift+alt+pagedown",
        "command": "-cursorColumnSelectPageDown",
        "when": "editorTextFocus"
    },
    {
        "key": "shift+alt+pageup",
        "command": "cursorColumnSelectPageUp",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+shift+alt+pageup",
        "command": "-cursorColumnSelectPageUp",
        "when": "editorTextFocus"
    }
]

As indicated on the top banner of Keyboard Shortcuts window, as an advanced user, can always go straight to the keybindings.json and modify the keyboard shortcuts in the json file directly.

Related Articles

How to Make Visual Studio Code Colorize Classic ASP Code
How to Reassign Column Selection Shortcut Keys in Sublime Text
How to Open Visual Studio Code from command line macOS
How to Add Comma to Each Line Using Visual Studio Code or Sublime Text

Further Reading

Key Bindings for Visual Studio Code

Download

Visual Studio Code

August 10, 2017 Filed Under: How To Tagged With: Code Editor, Microsoft, Visual Studio Code

Buy me a coffee?

Buy me a coffee If you find any of the articles or demos helpful, please consider supporting my work here, you'll have my big thanks!

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure