-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Option to disable cmd+click trigger for goToDefinition #23957
Comments
@nathanjd I am not sure I understand, how is this related to copy? |
Apologies, this seems to be how I have been selecting text for copy:
However, it seems that 60% of the time I end up hitting cmd before the click. This may be because, in my head, this is all one near-instantaneous operation. It's clear to me that I should train myself not to hit control until after the text is selected but it is proving a hard habit to break. I think that if given the option, I would change the goToDefinition shortcut to be alt+click or ctrl+click to remove the chance of accidentally colliding with my cmd based shortcuts. Keyboard shortcuts are super important in OS X and I have changed quite a few so I would love the ability to remap ALL key bindings. It seems that most are accounted for in the "Keyboard Shortcuts", but |
Yes, I too would love to have a way to disable this. It's something I always have to turn off in full Visual Studio for anything that does it (ReSharper, Pro Power Tools, etc). VS allows ctrl-click to select a word. vscode does not, however, I still instinctively try to do this, and the jumping around it causes is quite annoying. I'm rather surprised there was not an option for it initially, as you guys are generally really on top of having feature toggles available for any new features. |
I have the same thing happening as nathanjd, but trigger it in a different way. Doesn't happen often, but pretty annoying when it does. How it happens for me:
Seems like VSCode shouldn't "Go to link/definition" unless you press cmd first. After all it's |
Any update on this feature? |
Here the same situation. I don't know why anyone else thinks about it... :-( Very annoying... |
I can't imagine why this isn't an option or rebindable. Near-unusably annoying. |
I also use Ctrl+Click to select whole word all the time in Visual Studio and it is very annoying that this behaviour cannot be customized in VS Code. Is there any reason why this has been stalled so long? Thanks. |
Just wanted to add that, as @jkildedal mentioned, the gesture Please, please give us options. |
It might be conventional to Windows and Visual Studio, but it's far from the standard..neither Eclipse, IntelliJ IDEA, nor Sublime Text use Ctrl+Click to select a word. Agreed though, options/configuration will be nice to have. |
Bump Need this feature as well. I do Ctrl+Alt+click all the time by accident to use multiple cursors. Since it's Ctrl+Alt+up/down on the keyboard to add more cursors above/below, it makes total sense in my head that Ctrl+Alt+click also adds an extra cursor. But it doesn't. It not only flies the editor to a place where I'm not working on atm, it also does so in a secondary (split screen) editor. Both are annoying, and both casue me to get ripped out of my flow. |
Has this been fixed? It's crazy to me that a feature like this can't be disabled in an otherwise fantastically configurable editor. |
dear vscode team, PLEASE PLEASE PLEASE... allow us to disable the default behavior of ctrl + leftMouseButton (go to definition) AND... PLEASE PLEASE PLEASE allow us to enable ctrl + leftMouseButton to do WORD selection exactly as it behaves in Visual Studio 2019/2017/2015....... Thanks for your consideration! |
But please only take the GOOD bits of VS20xx. It is mostly a shit editor, but it does have some good traits. I'm glad and disappointed at the same time, that two essentially identical editors (as in, the component where letters appear, not the whole program!) from the same vendor, can be so different. It's almost like Microsoft is becoming Adobe. |
whenever I copy paste something I can get anywhere from 1 to 3 tabs opened with function definitions in my browser, it is really annoying to work with. |
Same problem here. I use Ctrl+Click to select words for copy and paste. More than happy to use the F12 key based shortcuts when I want to see definitions. It's the first thing I change in full VS when I do a new install. |
I changed the "editor.multiCursorModifier value to "ctrlCmd" settings.json: "editor.multiCursorModifier": "ctrlCmd", The "Ctrl+Click" then became a multiCursor trigger and "Alt+Click" became a goToDefinition |
This triggers the Multi-Cursor on click and unfortunately is equally annoying.. Almost 3 years later in 2020 this is still an issue with no fix ... (4 years for crtl + click for select #3130) |
This problem was enough to drive me away from VS Code. Let me know when it's fixed and I might use it again. As an aside note, I also find go to definition hyperlink mode seems to get stuck on sometimes and you have to hit ctrl again to get it unstuck. |
Hey! I would also second ANY HACK/OPTION/WORKAROUND to disable Ctrl+Click to navigate. I would like just simple selection of text to work. I would even more appreciate that with Ctrl selection would select whole word under cursor. But I can live with simply disabling those links after Ctrl. |
After using VS Community on windows recently I noticed the option is there. Please port it to the mac os version.
Thanks,
Antony
… On 4/04/2020, at 11:30 PM, Wojciech Gebczyk ***@***.***> wrote:
Hey!
I would also second ANY HACK/OPTION/WORKAROUND to disable Ctrl+Click to navigate. I would like just simple selection of text to work. I would even more appreciate that with Ctrl selection would select whole word under cursor. But I can live with simply disabling those links after Ctrl.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@Jav3k @purduemike That doesn't work when you want to hold ctrl and then "click word > C > click word > V", which is a fast way to select a word, copy it, select a different one, replace it. I can do this in traditional Visual Studio, and I do this really often, but it's pretty annoying that there's zero ways to configure VSCode to do this. I don't want to make this the default behavior, I don't mind configuring my editor to suit my needs, but this seems to be literally impossible right now... |
Not 100% sure if this is relevant; but I was able to move the "go to definition" behaviour to requiring a different keypress (such as It does seem as though this button is not 100% accurate with its description. It is a toggle button that switches between the state |
Thanks @WillDawe , you are a champion |
Just a reminder, there are also users that actually do want the "ctrl-click to navigate" behavior. As @Jav3k mentions above, fiddling with the |
It's been over 4 years! I guess we're all waiting for someone else to do it. Well, the wait is over! I don't use VS Code very often, but I would always come back and check the status of this when I needed to use it so I decided to spend a day and try to get this fixed. I managed to get a configuration property to replace the click link to gesture with word selection instead. If you want both, it is going to require more work since a lot of the key modifiers with selection are hard coded and the properties that do exist only support single enum values, not combinations. You could make a quick hard coded change to fix it. Looking at my commit should give you an idea of what to change. I am assuming that most people here are coming from full Visual Studio to program in a language not well supported by it and are looking for a similar experience. If you want to make more changes or it doesn't make it into in the build, you can follow this guide to build from my commit. If you build your own version you will need to modify Once in Visual Studio Code you can enable the feature or add the JSON property:
|
Come on guys, ctrl+click to select a word should have been the default functionality in the first release. People use Visual Studio Code because it has the words Visual and Studio in its name. There are plenty of other editors out there that don't work like Visual Studio. |
I don't understand why so many people love to double click. ctrl+click is one of the most efficient features of Visual Studio. Please add this to the release. |
This may have been true initially, but is certainly not true now. People use it because it's a standard editor for web development, and most of them likely have never used VS in their life... As a config option, great. As a default that goes against industry standards (ctrl+click = "find references / usages")...no. |
@clounie That may be industry standard for Windows software but it certainly is not for Mac OS X. |
The pull request isn't for a default option its to add the feature. If the contributed feature would be rolled in I think all parties would be very happy. |
|
It appears my code change will not be merged. I have seen more people request this feature and link to my pull request but it was too old to compile. For anyone that still wants this feature, you can find my updated change here. I also uploaded the compiled binaries for Windows which you can find in the Release tab. Follow the instructions on the README to enable the feature. |
@manuelxmarquez I doubt your feature could be totally done in an extension, correct, because there needs to be some base functionality to VSCode to allow access to mouse events? Would it be possible to break your VSCode PR into something more basic like exposing the mouse events and then extensions could be used to add in the settings to change the ctrl click behavior? (or is this exactly what you have? And if so, could the VSCode piece be made even more generic?) I would be willing to help you with a project of this nature. A feature that makes VSCode more configurable I think would have a better chance at a merged PR. I've also seen open tickets for just the mouse click configurability ability. Also, great work! And also, WTF, why would VSCode have so much control over the key board short cuts and no control over mouse short cuts?! 😡 |
@tbcarver I'm not sure how practical it is to allow that much configurability to mouse buttons. A lot of mouse behaviours are "standard" and hard coded. Allowing too much configurability would lead to conflicts. I'm not sure how much software allows that level of configurability, the only one that I can think of is Blender which allows you swap the Left and Right mouse buttons. I do remember a time when there were some issues if you did switch the default and some actions did not work properly. I'm not sure how many special cases like Go To Definition exist. I wanted at least to disable Ctrl+Click Go To Definition and wanted an experience close to Visual Studio since I use that most. I'm not sure about other editors and standards that people are used to and would expect. I don't have time to work on VS Code features and I don't use it often. It seems possible to do what you are after but might be a lot of work. I think one of the more challenging parts is deciding what actions are configurable and how to allow the user to configure it. For reference, this is the Visual Studio option. All I did was add the reverse option to VS Code. I added a checkbox to perform word selection when Ctrl is pressed. |
Related: #212444 |
Starting ~2 weeks ago, I have been plagued by this feature. Somehow I manage to trigger this feature about 60% of the time when I am trying to copy+paste. It is the same issue as reported here, but in the editor so am creating this ticket as suggested by @bpasero .
#7827 (comment)
Steps to Reproduce:
Don't get me wrong, I love this feature but whatever changes were made recently seem to be incompatible with my muscle memory when copying text. So, I would like to change the keybinding, or at the very least turn it off altogether.
The text was updated successfully, but these errors were encountered: