Column selection like Visual Studio - visual-studio-code

Is it possible selecting multi-line columns like Visual Studio (or Notepad++ or other text editor)?
If I press shift+Alt buttons and move the arrows button the behavior of Visual Studio code is different from the other text editor.
Thanks!

v1.43 brought what you are looking for in a new "Column Selection Mode". Demo:
See https://github.com/microsoft/vscode/issues/91249:
While this is checked, selecting with the mouse will create a column
selection and Shift+arrow keys and Shift+Page Up/Down keys will also
create column selection.
Also https://github.com/microsoft/vscode/issues/91361 which would act as a toggle for preexisting selections when enabling/disabling Column Selection Mode. So a current selection would be modified to a column selection (including multiple cursors) when enabling the mode and vice-versa.
And https://github.com/microsoft/vscode/issues/91362 where enabling the Column Selection Mode would be indicated in the Status Bar.
See https://code.visualstudio.com/updates/v1_43#_column-selection-mode
You can also disable Column Selection mode from the Status bar.

Related

Generate editable cursor positions on VSCode [duplicate]

In sublime text I used to use a shortcut that allowed me to tab through my multi selection and edit each element individually.
for example I would cmd+d a word then the shortcut would allow me to tab through each selection and edit them individually.
I haven't used sublime text in a month since I switched and can't even remember the shortcut I used to find the name of that action. so I don't even know if it was a plugin or a built in short cut.
is there a similar shortcut in vscode?
You can multi-select in VSCode using alt+click
(can be changed to cmd+click in "Selection -> Switch to Cmd+Click for Multi-Cursor").
To tab through your selections install the tab-through-selections extension and then use cmd+shift+u to start iterating (alternativley ctrl in Windows), then:
tab to go to the next selection
shift+tab to go to the previous selection
click anywhere to cancel iterating
Hope this helps :)

Disable multiple cursors in VSCode

I was playing on my vscode configurations and accidentally change some configuration when I want to select the text on my code lines.
For example, when I want to select some lines in my code immediately appears a lot of cursors instead of selecting the text that I wanted. How can I change this configuration? Because a few days ago the selection in VSCode worked properly.
As you can see on the screenshot below, this happens when I try to select those lines :(
Turn off Column Selection Mode
From the main menu: Selection/Column Selection Mode uncheck
or there should be a Column Selection button on the Status Bar to the right that can be disabled.

Which setting in visual studio code has changed selection pattern like these?

I have accidently changed selection pattern in my Visual Studio Code editor so that selection of code in file has been difficult when I want to copy and paste code. Want to reset selection to normal.
Go to File -> Preference -> Settings and search for Column Selection. You want that off if you want the default mouse selection. Also, tip: if you have it off, you can always hold down Shift + Alt if you want that selection action.

Line selection not working properly on VSCode

My line selection is acting very weird on VSCode. It goes in this weird multi-line edit mode. I am unable to select multiple lines fully by dragging my mouse down on lines. Even when I use shift and down arrow it does not select the whole line.
Mouse drag selection not working:
Keyboard Shift + Down Arrow not working:
On Mac the solution was simple go to the menu "Selection" and deselect the option "Column Selection Mode".
Now it works as expected.
Two things I use:
I select full lines by clicking and dragging in the 'numbers' columns
For multi-line to work I use the menu option -> Selection -> Column Select Mode
I had the same issue. Resolved it as below.
Go to Selection menu in vs code menu bar.
Untick on Column Selection Mode option.
go to file, preference, settings and search for Editor:Column Selection and desable. this solve my problem
There are two options:
If you wish to perform the desired selection without changing the settings, then hit the ALT key and drag your mouse
Or, just Go to Selection menu in VS code menu and untick the Column Selection Mode option.

Disable multi cursor functionality

I do not like the Visual Studio multi cursor options, and I never use them.
Inevitably, I phantom-pressing some key combination that brings up a multi cursor option, then I write some code, and then the code is destroyed afterward. Please tell me how to completely disable all such functionality in Visual Studio Code. I am running on Ubuntu, but also interested in how to accomplish this on Windows (if there is any difference).
I should mention, that this happens literally once every 5 minutes to me on Ubuntu, but in Windows it happens much less frequently (like once an hour).
Un-check Selection->Column Selection Mode
You can remove the keyboard shortcut(s) that trigger this functionality.
Click on the gear on the bottom-left corner of the window and choose "Keyboard Shortcuts" from the menu. Type "Add Cursor" into the "Search" box and it shows only the commands that contain "Add Cursor" in their name.
Right-click on each command that add a cursor and has a keyboard shortcut associated and select "Remove Keybinding".
Also search for "Multi-Cursor". It could return the command "Toggle Multi-Cursor Modifier" that is associated to a combination of modifier keys (one or more of Ctrl, Alt, Shift). If such a combination of keys is pressed when you click in the editor window it adds a new text cursor at the click position. You should also removed these key bindings.
Set this settings in editor settings :
"editor.columnSelection": false,
In Android Studio :
Un-check Selection->Column Selection Mode