eclipse IntelliJ中的eclipse ctrl+k等效快捷方式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14856947/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:59:54  来源:igfitidea点击:

eclipse ctrl+k equivalent shortcut in IntelliJ

eclipseintellij-idea

提问by Kummo

In Eclipse, if the cursor is over a word and you press Ctrl+Kyou will jump to the next occurrence of that word in the file.

Eclipse 中,如果光标位于某个单词上并按下Ctrl+,K您将跳转到文件中该单词的下一个出现处。

Is there a similar shortcut in IntelliJ?

IntelliJ 中是否有类似的快捷方式?

回答by CrazyCoder

Find word at caret, default is Ctrl+F3, can be changed in File| Settings| Keymap:

在插入符号处查找单词,默认为Ctrl+ F3,可以在File| 中更改 Settings| Keymap

Find word at caret

在插入符号中查找单词

回答by cheneym

You will need 2 Steps to archive a similar behavior:

您将需要 2 个步骤来存档类似的行为:

Step 1:

第1步:

Press Ctrl+F3to start a search for the current selectet text (if no text is selected then the whole word will be taken).

Ctrl+F3开始搜索当前选择的文本(如果未选择文本,则将采用整个单词)。

Step 2:

第2步:

Press F3to jump to nextoccurrence or Shift+F3to jump to the previous.

F3跳到下一个事件或按Shift+F3跳到上一个

This approach will even continue the search for the text if you switch to another file. Just press F3and you will jump to the next occurrence in the other file.

如果您切换到另一个文件,这种方法甚至会继续搜索文本。只需按F3,您就会跳到另一个文件中的下一个事件。

回答by Ayaz Ahmad

Shift+F3works for me in Android Studio / IntelliJ, in eclipse we were using Ctrl+K

Shift+F3Android Studio / IntelliJ 中对我来说有效,在 eclipse 中我们使用Ctrl+K

回答by Aliaksei Tatarynchyk

You can do it using macros:

您可以使用宏来做到这一点:

  • Edit -> Macros -> Start Macro Recording
  • Edit -> Find -> Find Word at Caret
  • Edit -> Find -> Find Next/ Move to Next Occurrence
  • Edit -> Macros -> Stop Macro Recording
  • Give some name for the macro, e.g. "simulate Eclipse Ctrl+K"
  • File -> Settings -> Keymap -> Find the macro "simulate eclipse Ctrl+K" -> bind hotkey Ctrl+K
  • 编辑 -> 宏 -> 开始宏录制
  • 编辑 -> 查找 -> 在插入符号处查找单词
  • 编辑 -> 查找 -> 查找下一个/移动到下一个事件
  • 编辑 -> 宏 -> 停止宏录制
  • 为宏命名,例如“simulate Eclipse Ctrl+ K
  • File -> Settings -> Keymap -> 找到宏“simulate eclipse Ctrl+ K” -> bind hotkey Ctrl+K

The same can be done for the Ctrl+Shift+K(use Find Previous/ Move to Previous Occurrence).

可以对Ctrl+ Shift+执行相同的操作K(使用 Find Previous/Move to Previous Occurrence)。

回答by Venkittarayan Chandrasekharan

enter image description here

在此处输入图片说明

You need to first do Ctrl+F on the selected word, now this gets cached then you can use the Ctrl+L and ctrl+shitf+L for going down and up respectively. This is already present. its just that instead of ctrl+K you got use ctrl+L. small change same effect

您需要首先对选定的单词执行 Ctrl+F,现在它会被缓存,然后您可以使用 Ctrl+L 和 ctrl+shitf+L 分别向下和向上。这已经存在。只是你使用了 ctrl+L 而不是 ctrl+K。小改动一样的效果

回答by Osify

I think Android Studio/IntelliJdoesn't play that well, for me, I changed Android Studio Keymapto Eclipseas I used to (My collection tips) and to use Ctrl+K, I press search the string first:

我认为Android Studio/IntelliJ不能很好地发挥作用,对我来说,我像以前一样将Android Studio Keymap更改为Eclipse我的收藏技巧)并使用Ctrl+ K,我首先按搜索字符串:

  • Select the text we want to search
  • Press Ctrl+F, Enter
  • Then can use: Ctrl+Kin any file we are on
  • 选择我们要搜索的文本
  • Ctrl+ F,Enter
  • 然后可以在我们所在的任何文件中使用:Ctrl+K

That's what I'm doing, hope can help someone with that.

这就是我正在做的,希望可以帮助某人。

回答by DilanD

There are 2 options like below in : Settings -> Keymap -> Main menu -> Find

有如下 2 个选项:设置 -> 键盘映射 -> 主菜单 -> 查找

  • Find Next / Move to Next Occurrence
  • Find Previous/ Move to Previous Occurrence
  • 查找下一个/移动到下一个事件
  • 查找上一个/移至上一个事件

For me, this didn't work at the start because GIT push shortcut was using the same keys (Ctrl+ K& Ctrl+ Shift+ K). All is good after changing the conflicting GIT shortcuts.

对我来说,这在开始时不起作用,因为 GIT 推送快捷方式使用相同的键 ( Ctrl+ K& Ctrl+ Shift+ K)。更改冲突的 GIT 快捷方式后一切正常。

回答by bluearrow

Keymap : Mac OS X 10.5+

键盘映射:Mac OS X 10.5+

  • To start / add to your discrete multiple selection : CTRL+G
  • To skip the current selection and move to the next : CMD+G
  • 要开始/添加到您的离散多项选择:CTRL+G
  • 跳过当前选择并移至下一个:CMD+G

Refer: Does IntelliJ have a `Ctrl` + `K`,`Ctrl` + `D` Sublime equivalent? How do I skip a match when using Alt+J for multiple selections in Android Studio?

参考: IntelliJ 是否有一个 `Ctrl` + `K`、`Ctrl` + `D` Sublime 等价物?在 Android Studio 中使用 Alt+J 进行多项选择时如何跳过匹配项?

回答by abhishek ringsia

In IntelliJ, if the cursor is over a word and you press Command+Gyou will jump to the next occurrence of that word in the file. Similarly, you press Command+Shift+Gyou will jump to the previous occurrence of that word in the file

在 IntelliJ 中,如果光标在一个单词上并按下Command+,G您将跳转到文件中该单词的下一个出现处。同样,您按Command+ Shift+G将跳转到文件中该单词的上一个出现处