question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ctrl + click "go to definition" clashes with ctrl + click "follow link"

See original GitHub issue

@AngusWR commented on Wed Sep 25 2019

Environment data

  • VS Code version: Version: 1.38.1
  • Extension version (available under the Extensions sidebar): Version: 2019.9.34911
  • OS and version: Windows 10 Pro 1903 18362.356
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.7

Expected behaviour

ctrl + click on a string representation of a url opens the url in chrome

Actual behaviour

ctrl + click on a string representation of a url opens the url in chrome and also goes to the definition for str in builtins.pyi

Holding ctrl and hovering the url:

1

After clicking the url

2

I haven’t been able to find a way of changing the key binding for the “go to definition” feature. Any advice?


@karrtikr commented on Thu Sep 26 2019

For changing keybindings, go to File -> Preferences -> Keyboard shortcuts. Search for Go to definition. Anyways, this is controlled by VSCode, not the extension. So I am transferring the issue.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
matthewbordascommented, Jan 12, 2022

Any updates on this? It’s a very painful issue when writing in Golang. I can’t seem to find a workaround other than using F12 or right-click + Go to Definition, both of which are slower than ctrl/cmd + click. Thank you!

4reactions
stamblerrecommented, Jan 26, 2020

We’ve also encountered this issue, specifically with developing the Go language server. We wanted to make import statements (like import "fmt") link to documentation on the package, so we implemented textDocument/documentLink for import statements. We also figured that a user may not always have an Internet connection and should also be able to jump to the source code of the package, so we implemented that in textDocument/definition.

However, the result is that, if the user does a Ctrl + Click on an import statement, VS Code will both open a link and jump to the definition of the package, which is not a great user experience. Is there any way to work around this, or should we just disable one of the two behaviors?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How I can make `ctrl + click` to go to definition in visual studio ...
Go to Settings and search for "ctrlCmd". There are two settings that overrode the command: Editor: Multi Cursor Modifier and List: Multi Select...
Read more >
Ctrl+Click Go To Definition - Visual Studio Marketplace
This feature enables clickable hyperlinks to symbols in source code in your code by holding down the Ctrl key when hovering with the...
Read more >
Structure Visualizer & Ctrl + Click to Go to Definition
To disable Ctrl + Click to Go to Definition and revert back to the previous behavior to select the symbol, just uncheck the...
Read more >
Mac keyboard shortcuts - Apple Support
Control –Command–Power button:* Force your Mac to restart, ... Click the Go menu in the Finder menu bar to see shortcuts for opening...
Read more >
how to create ctrl+click to follow link in word - (주)이글벳
For example, in the picture below, the text "ComputerHope website" is highlighted. Go to Tools, Options, and on the Edit tab uncheck the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found