Jump to declaration with ctrl + left-click
已回答
Hi,
I'm using IntelliJ for a Grails project that contains a mixture of Groovy and Java code. I have the Eclipse keymappings turned on and the VIM plugin installed (and active). When the cursor is over a reference (class, method, etc), I can press F3 to jump to the declaration. I used to be able to do this by holding down ctrl and clicking on an a reference, but it no longer seems to work. Is there a setting somewhere to enable this?
Thanks,
Don
请先登录再写评论。
Which reference is it exactly? Does Goto Declaration work on this very
reference? Does Find Usages in File work? If you enable 'highlight
usages of element at caret' option, will it work with that reference?
For example, in the following class:
public class Foo {
private Bar bar;
public Foo(Bar bar) {
this.bar = bar;
}
}
If I put the caret on Bar and press F3 it will jump to that class' definition. The 'highlight usages of element at caret' option also works. The behaviour I'm seeking is that if I click on Bar while CTRL is pressed, the editor jumps to the class definition (just as it does now when F3 is pressed), is it possible to do this?
Thanks,
Don
Hello Don,
The mouse click uses the same keyboard modifier as the "Goto declaration"
action. So this won't work if you have remapped the action from Ctrl-B to
F3. You need to keep Ctrl-B as the first shortcut for the action - then it
will work.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Ten years later same problem:
A fresh install of Linux Mint 20 Cinnamon with a fresh install(via toolbox) of rubymine(imported settings from recent Rubymine version on mint 18), goland, phpstorm.
In all IDEs:
- the strg+left klick does not work
- strg+b works just fine
- strg and carret on the symbol turns on the blue link and the info-bubble appears.
i have a MX master connected via bluethooth and unifying receiver, which makes no difference. I also searched all of the default system shortcuts in linux mint but did not find anything. My colleague has the same setup without probs, only on a different Laptop (Dell Precision vs Dell XPS).
Besides i also looked into the custom keymap xml, changed the keymaps but nothing changed.
Hello,
Please report new issue on YouTrack: https://youtrack.jetbrains.com/issues/IDEA attaching idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue. Is "strg+left klick" action detected in "Settings | Keymap | Find Action by Shortcut"?
Thanks yaroslav,
i reported the issue here: https://youtrack.jetbrains.com/issue/IDEA-245066
Thanks!