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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityDoes 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.
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)
File > Preferences > Keyboard Shortcuts
. Then search for cursorColumnSelect
, then you can modify the keyboard shortcuts. This is done on VS Code, version 1.22. Of note, columnSelect
is what you would need to change for Shift
+ Alt
+ Drag, but right now, there's no way to register a mouse button down event in Electron.
– tom_mai78101
Apr 29 '18 at 23:58
On macOS: Shift+Option and mouse, or Shift+Option+Cmd and arrow keys
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.
SetTitleMatchMode, 2
so it accepts wildcard titles. A VSCode window shows Filename.txt - MyFolder - Visual Studio Code
– Jack
Jul 8 '19 at 6:40
Visual Studio Code
. Need to set the title match mode to 2 so it searches that the title contains the text.
– Jack
Jul 9 '19 at 16:08
As of Visual Studio Code 1.2, they have full column selection. See Column (box) selection
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.
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.