37

After upgrading to Visual Studio 2015, holding control while clicking on a symbol navigates to that symbol definition. In prior versions, this would instead select the entire word.

How can I disable the navigation event when CTRL + Click(ing) a symbol, so that it highlights the word?

I do have Resharper (Ultimate 9.2) installed. The configuration option under Environment -> Search & Navigation -> Go to Declaration on Control + Click in the editor is not checked.

All the search engine results make mention of this being a feature of the Productivity Power Tools extensions in previous versions of Visual Studio. I do not have that extension installed.

ROOT
  • 11,363
  • 5
  • 30
  • 45
Matt Murrell
  • 2,321
  • 2
  • 23
  • 39
  • 1
    Could you try to disable option `Text Editor` > `All languages` > (your language) > `Enable single-click URL navigation`? – miroxlav Sep 09 '15 at 21:21
  • That had no effect. :( – Matt Murrell Sep 10 '15 at 15:50
  • In Visual Studio options and in Resharper options, try searching for "click". Maybe you have some others options there I cannot see in my VS Professional. – miroxlav Sep 10 '15 at 16:51
  • Do you have the Productivity Power Tools extension installed? It also offers this feature (and an option to disable it). – cremor Sep 11 '15 at 06:39
  • The answer I am looking for is here: http://stackoverflow.com/questions/24433905/can-you-turn-off-peek-definition-in-visual-studio-2013 – Adam Heeg Nov 03 '15 at 16:30
  • @MattMurrell any news about this? – 100r Jun 23 '16 at 13:00
  • Control+Click Navigation is not default in VS 2015. I would love to have it but it doesn't exist. To select a whole word I use double click. This works in every text editor I have ever seen. Even Microsoft's Notepad. – The incredible Jan Apr 09 '21 at 07:14

8 Answers8

62

I found my solution in the "Options - Text Editor - General" settings. This was on VS 2017 thou.

enter image description here

Andreas
  • 5,393
  • 9
  • 44
  • 53
MrDracow
  • 754
  • 6
  • 5
  • 2
    **This** resolved it for me. I wanted the ReSharper behavior but something used ctrl+leftclick too so I always jumped somewhere in the middle of the document. Did not find it in the Productivity Power Tools, cause I have deinstalled this extension part. Nice to see that Visual Studio includes this functionality by default now, but it was hell to find the option. It just randomly activated it in the last update I guess. – Wolfsblvt Oct 26 '17 at 11:00
  • That was tricky, After updating VS, the options are reset for some reason – Hussein Khalil Nov 13 '17 at 08:17
  • This solution still works in VS2019. Thank you. I was going crazy trying to turn that off. – NotMe Sep 04 '19 at 01:36
  • If only the Search filter could find this option when I write "ctrl". – demoncodemonkey Nov 25 '20 at 17:13
  • How can this be the accepted answer? VS2017 is not VS2015. This setting doesn't exist in VS2015. – The incredible Jan Apr 09 '21 at 07:16
17

To disable navigation to symbol definitions in VS2015, this one worked for me.

Pang
  • 9,564
  • 146
  • 81
  • 122
Abdul Waahid
  • 179
  • 1
  • 4
9

With Resharper Ultimate 2016.3.1, I could fix the issue by disabling "Rich mouse navigation in the editor". It can be found in Resharper Options window, under Environment > Search & Navigation. Maybe updating Resharper could solve the issue.

Also, Productivity Power Tools is not installed on my machine.

4

In vs 2017 this setting is available in Tools -> Options -> Text Editor -> General -> Enable mouse click to perform Go to Definition.

You can uncheck it!

MOH3N
  • 905
  • 9
  • 14
2

Go to ReSharper Options > Environment > Search & Navigation, then uncheck the following options:

  • Rich mouse navigation in the editor
  • Enable 'Smart go to declaration'

I finally solved it following the info I found on this page..

MA9H
  • 1,849
  • 2
  • 16
  • 19
1

edit

Ensure you are using Visual Studio as your resharper keyboard scheme.

Environment -> Keyboard & Menus

enter image description here

Tools -> Options -> Environment -> Keyboard

To stop the go to declaration, select it and input a new key short cut for it. In this image I have demonstrated that I changed this short cut to ctr num 1 and could not change it to ctr num 3. On testing crt click does not no take me to the declaration.

enter image description here

Find the shortcut you want to remove, in this case Edit.NavigateTo and remove.

enter image description here

  • There is no shortcut assigned to Edit.NavigateTo in my configuration. Nothing to remove. – Matt Murrell Sep 14 '15 at 18:06
  • This does not fix the problem for me. Holding ctrl still creates a hyperlink like action on a variable which still pops up the 'peek' window. – Adam Heeg Nov 03 '15 at 16:26
  • Sure thing - I'm not sure if I'm reading the question wrong on this post - However what did work for me I linked in the comments of the question. If I misunderstood what this is fixing I apologize. – Adam Heeg Nov 04 '15 at 13:30
1

An update for Productivity Power Tools + VS2017. Instead of having settings for this feature, a separate plugin gets installed. So after installing PPTs, you'll have a new extension called Ctrl+Click Go To Definition. Not sure why we need that tool considering it's baked into VS, but...

Anyway, Disabling that extension (plus the other things mentioned in other comments for VS and Resharper) fixed my ctrl+click woes.

Eli Gassert
  • 9,745
  • 3
  • 30
  • 39
  • 1
    @Ma'moun othman FWIW I rolled back your edit of `ctrl` because the label of the extension is _actually `Ctrl+Click` and I wasn't instructing the user to use the `CTRL` key. – Eli Gassert Mar 17 '20 at 09:49
0

To switch to the Visual C# keyboard mapping scheme

  • On the Tools menu, click Options.
  • Expand Environment, and then click Keyboard.
  • Select Visual C# 2005 from the Apply the following application keyboard mapping scheme drop-down list.

or you can do

Keyboard: CTRL + W

also plugin can be used

enter image description here

Keyboard Shortcut Exporter you can import/export keymapping file

Kaleem Ullah
  • 6,799
  • 3
  • 42
  • 47