microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.71k stars 29.08k forks source link

Word selection when holding Ctrl and dragging with mouse #34354

Open Montago opened 7 years ago

Montago commented 7 years ago

in VS2015 you can select whole words by holding down CTRL and do selection, it's faster and easier !!

you can also CTRL + CLICK to select a whole word.

MAKE IT SO ... please :)


Edit by @hediet: Video: https://www.youtube.com/watch?v=bfyO8haWKfg

alexdima commented 7 years ago

This is also possible in VSCode via alt+click out of the box. The modifier can be changed to ctrl+click via the menu Selection > Switch to ctrl+click for multi-cursor.

Additionally, box selection can be done via ctrl+shift+alt and dragging.

Montago commented 7 years ago

No, those two features are unrelated !

I'm NOT talking about multicursor.

I'm talking about WORDS SELECTION

There is no option to enable CTRL+CLICK for selecting a whole word or holding down CTRL and CLICK/DRAG for selecting words.

You need to try in Visual Studio 2008/2012/2013/2015/2017

Montago commented 7 years ago

ctrl+shift+alt and dragging doesn't do anything in VSCODE ... or it doesn't work for me...

Montago commented 7 years ago

https://stackoverflow.com/questions/43428264/use-ctrlclick-to-select-word-in-vs-code

alexdima commented 7 years ago

I think box selection is doable via shift+alt, not ctrl+shift+alt:

kapture 2017-09-28 at 12 53 49

Montago commented 7 years ago

Regarding box-selection, i think its annoying that you need to place the cursor before starting the selection. in VS2015 that happens automatically + the whole selection has a background that indicate the selection. In VS2015 you can also select blank space if you need to - this doesn't work in VSCODE (can't say i miss it though.. but occasionally it made sense to do so)

Regarding the CTRL + CLICK to select a word and CTRL + DRAG to select multiple - i hope you can do something about that.

Montago commented 6 years ago

remove the "editor-columnselect" tag too

trevordaniels commented 6 years ago

I think the new title is not correct as this request is not just about selecting words by dragging the mouse, but also selecting a whole word by using ctrl + click.

trevordaniels commented 6 years ago

3130

trevordaniels commented 6 years ago

also related #27905

AdjutantML commented 4 years ago

+1 This is one of the the first features that I missed in VS Code when coming from Visual Studio

mammadkoma commented 4 years ago

When we can use ctrl+click to select word? 3 years have passed!

WalterRoberts commented 4 years ago

Please add this feature as soon as possible! Using this in combination with Ctrl+X/C/V would be a true time saver when making selections and editing with the mouse!

alexanderkushnirchuk commented 4 years ago

Still waiting for this feature, it's really useful

shinolex commented 4 years ago

Will this feature come soon? I just started to use vs code and I realized how often I was using ctrl+click to select word and ctrl+click+drag to select a piece of code in visual studio :( Also I wish that multi row edit were working like it was in visual studio(alt+click shortcut in visual stuio)

ModCraig commented 4 years ago

This drives me crazy. I have to work so much slower in VS Code when copy/pasting because I have to carefully place the cursor at the start of the word each time instead of just Ctrl-Clicking like in most other programs.

Please can this be added to the change list asap?

jjblodgett commented 3 years ago

This is SO INCREDIBLY FRUSTRATING to not be able to CTRL + Click to select a word and then to subsequently drag the mouse to continue selecting additional words in a continuous phrase.

If I'm copying a large amount of text from one location to another in the same file or different files, it is dramatically slower to have to take my right hand off of the mouse and use keyboard action instead of just keeping the left hand on the keyboard and right hand on the mouse.

This is how it should work:

In this scenario, the hands never move from the keyboard or mouse. Instead, I have to constantly take my hand off the mouse or keyboard to do various combinations of actions that work perfectly in Visual Studio, SSMS, and most other Microsoft Tools.

I need to use this mechanic frequently (usually daily) and it takes me orders of magnitude more time to constantly position my cursor precisely and take my hands on / off the keyboard and mouse. PLEASE ADD THIS FEATURE ASAP!!!

hediet commented 3 years ago

Can you provide a screenrecording of how this feature works in in Visual Studio?

Montago commented 3 years ago

Can you provide a screenrecording of how this feature works in in Visual Studio?

Ive make a video of it : https://www.youtube.com/watch?v=bfyO8haWKfg

legier commented 1 year ago

Years are passing and this feature is stil not done. I would love to have it since it speeds up copy and pasting immensely.

belov-sergei commented 1 year ago

It turns out that after double-clicking, we can drag the mouse to make the selection snap to entire words. I didn't know. I think this solves the problem. On Windows, this works everywhere, even in notepad. Code_eocBUdWd5J

jjblodgett commented 1 year ago

Hi. Thanks for providing that option. While this provides a partial solution to "part" of the problem, it is still at least "double" the work by definition. If you're copying and pasting hundreds of individual words, having to double click each one is still cumbersome.

And it still does not allow for more rapid entry because in a CTRL + Click scenario, I can rapidly click and drag without having to pause in between. This means I can leave my left hand on the CTRL button and rapid select-copy-paste where I need it to go with the mouse being constantly in motion. In the option you've provided by double-clicking, I must go over the word, pause, double-click, then drag.

Adding in the pause/double-click to the process introduces a disruption of the flow of movement (I have tried it several times). It is very clunky and segmented where it should just seamlessly work from phrase to phrase. And if I'm copying and pasting phrases over top of each other, I have to double click at both the copy AND paste and it is even worse. It's much harder to get into any kind of a rhythm by throwing in double clicks at each major step.

I get that some people may not want this feature, but it's a VERY valuable tool to have available. It should definitely be something that's able to be used by those that can take advantage of it. We shouldn't ignore the feature just because there are some partial solutions elsewhere.

KisaDmitriy38 commented 1 year ago

R19.08.2023, 23:01, "jjblodgett" @.***>:

Hi. Thanks for providing that option. While this provides a partial solution to "part" of the problem, it is still at least "double" the work by definition. If you're copying and pasting hundreds of individual words, having to double click each one is still cumbersome. And it still does not allow for more rapid entry because in a CTRL + Click scenario, I can rapidly click and drag without having to pause in between. This means I can leave my left hand on the CTRL button and rapid select-copy-paste where I need it to go with the mouse being constantly in motion. In the option you've provided by double-clicking, I must go over the word, pause, double-click, then drag. Adding in the pause/double-click to the process introduces a disruption of the flow of movement (I have tried it several times). It is very clunky and segmented where it should just seamlessly work from phrase to phrase. And if I'm copying and pasting phrases over top of each other, I have to double click at both the copy AND paste and it is even worse. It's much harder to get into any kind of a rhythm by throwing in double clicks at each major step. I get that some people may not want this feature, but it's a VERY valuable tool to have available. It should definitely be something that's able to be used by those that can take advantage of it. We shouldn't ignore the feature just because there are some partial solutions elsewhere.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***> -- Kisa4545 Kisa6677

jjblodgett commented 1 year ago

For everyone else, see this comment in a related thread: https://github.com/microsoft/vscode/issues/27905#issuecomment-1012801784

A developer has created a hook to do this generally in Windows. I've asked for an update to click/drag instead of just selecting a single word. But it's way better than the "nothing" we've gotten in the last 5-6 years of waiting for a solution.

Here's the direct link. Hopefully he can modify to allow for dragging to select multiple words and I'd definitely chip in some $$$ to support him! https://github.com/dougbenham/CtrlClick/releases/tag/v1.0