Celeb Glow
updates | March 04, 2026

Selecting columns in Visual Studio Code

Does Visual Studio Code support selecting columns of text?

I have not yet found this feature, so I am wondering if it is hidden somewhere. I am familiar with holding down Alt while selecting text, but Visual Studio Code does not behave this way.

6

11 Answers

In Visual Studio Code version 1.0, you can now select columns by holding down Shift+Alt, then click and drag with the mouse. This can also be done using just the keyboard by holding down Ctrl+Shift+Alt and then using the arrow keys.

On latest version of vscode - 1.45.1, you can achieve same by Shift+Alt itself ( verified in May 2020)

20

On macOS:Shift+Option and mouse, orShift+Option+Cmd and arrow keys

10

For the ones who have tried to use the Alt Key + Mouse Selection, and failed. Try to Click the menu selection as follows:

Menu bar > Selection > {Click} Switch to Ctrl+Click for Multi Cursor. This will change the multi selection the with Ctrl key and mouse as well as enable to selection column selection with the Alt Key + Mouse Selection.

4

I just published an extension for Visual Studio Code that converts a multi-line selection into a column selection. It mimics TextMate's Toggle Column Selection command and serves as an alternate approach to Visual Studio Code's commandoptionshift + arrow keys that I find more natural to work with.

4

As of Visual Studio Code 1.2, they have full column selection. See Column (box) selection

2

As none of the existing answers mention this:

The simplest way to achieve the desired result (as of April 2018 version 1.23) is to middle click and drag.

1

For all you visual learners, there is (as of version at least version 1.55) a graphical menu way to turn it on and a even faster way to turn it off. Go to Selection \ Column Selection Mode to toggle this feature on or off. If Column Selection Mode is enabled, there is a notice in the bottom VSCode status bar (circled in red in my illustration). A quick click on this notice will turn it off.

enter image description here

On a Mac, to use only the keyboard, I just had to use Cmd+Shift+Opt and then arrow keys.

I have tested this on Windows 10 Pro 1909 and Linux Mint 19.3 VSCode 1.45.1 on both OS's. When I was holding Shift+Alt+Mouse Click it was dragging the Window around. What might be a better explanation is this:

HOLD down LEFT mouse button anywhere in the code then press and HOLD SHIFT+ALT. With all 3 Held down drag mouse in any direction with the mouse for column select.

Click the somewhere at top line of the text. Select none or select some text. Hold the Shift key and click the somewhere in the following lines.

1

Sublime text has this shortcut to select columns: Ctrl + Alt + Up or Ctrl + Alt + Down

So with just adding this extension to VSCode: Sublime Text Keymap and Settings Importer.

You can use the shortcut and done!.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy