6

After a lot of research, I finally decided to try to find help here.

My setup (for work):

  • Debian Buster x86_64 (kernel: 4.13.0-1-amd64 4.13.4-2)
  • Visual Studio Code v1.19.3 (Commit 7c4205b5c6e52a53b81c69d2b2dc8a627abaa0ba)

When I try to use the "Column selection" feature, with Alt + Right click or Alt + Shift + Right click, it is not working.

This feature is really important for me, cause I edit a lot of configuration files... I already tried to change the gnome-shell default "windows key" used to interact with windows -> not better...

Would someone have an idea of whatever could be the cause of this issue ?

Thanks by advance.

H.

Hikaru
  • 61
  • 1
  • 4
  • I think it's `Alt` plus any selection keys, ie `Alt` + `Left Click - and Move`, or `Alt` + `Shift` + `Arrows`. That is select as you normally do, just press `Alt` to enable column selection mode. Simply click on the document to revert to line mode. – Constantine Georgiou Feb 07 '18 at 14:23
  • Thanks for your answer, and yes I meant Left click instead of Right click, my bad... I tried the `Alt` + `Left click` on my personal linux (mint) and it works like a charmed, but not on my professional laptop. I suspect a keyboard shortcut conflict, but impossible to find it! – Hikaru Feb 08 '18 at 08:57
  • 1
    See https://stackoverflow.com/questions/46669867/column-selection-like-visual-studio perhaps of aid. – Mark Feb 27 '20 at 05:37

3 Answers3

14

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.

https://i.stack.imgur.com/x8tJN.png

Calibr3
  • 241
  • 2
  • 3
  • For some reason, Alt + Shift + Click stopped working for me, possibly being consumed by my WM. This option works great though, thanks. – DLAN Aug 04 '22 at 19:25
2

Have a look at this. https://github.com/Microsoft/vscode/issues/34654

SHIFT + ALT + LEFT Mouse works for me

Achilles
  • 117
  • 1
  • 3
  • 11
2

There are 2 closely related features:

  • "column selection"
  • "multi-cursor selection"

Multi-cursor selection

You hold down a key and click on multiple places in your code. Each click adds a cursor.

multi-cursor selection

It's always enabled, but you do need to hold down a key. And this key can be configured:

File > Preferences > Settings > Search for: "multi cursor modifier"

However, be aware, that if you change this key, it always impacts the Ctrl-click behavior, which is used to navigate to code definitions.

Column selection

This means that you can drag a vertical line or a rectangular box in your code.

column-selection

You can toggle it in the menu of visual studio code.

Selection > Column Selection Mode

You can also toggle this mode with Ctrl-Shift-!

bvdb
  • 22,839
  • 10
  • 110
  • 123