gpt4 book ai didi

intellij-idea - IntelliJ : Is there a shortcut for "peeking declaration"?

转载 作者:行者123 更新时间:2023-12-04 16:30:32 26 4
gpt4 key购买 nike

public static final String XYZ = "something"; // line 1
return XYZ; // line 2

将光标放在第 2 行的 XYZ 上,我知道 Ctrl+B 会将我带到第 1 行,其中 XYZ 已定义。

有没有办法暂时偷看它的声明?也就是说,按住某些特定键,它会转到第 1 行,但当我松开时会返回第 2 行?

最佳答案

当光标在 XYZ 上时,

View > Quick Definition 将导致弹出窗口显示该常量的定义。然后您可以点击 ESC 关闭弹出窗口,此时光标仍将位于 XYZ 上。

例如:

enter image description here

您可以在该菜单项旁边看到 View > Quick Definition 的键盘快捷键...

enter image description here

关于intellij-idea - IntelliJ : Is there a shortcut for "peeking declaration"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47144899/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com