In Eclipse I can highlight text in the editor such as "foobar" and then hit Ctrl+K
, and Eclipse will automatically do a "find next" operation as if I had originally searched for "foobar". I don't have to do a separate "search" operation for the selected text. How do I do this in IntelliJ?
If I switch IntelliJ to Eclipse key mappings, indeed I can press Ctrl+K
to invoke the "find next" operation. Unfortunately it ignores the selected text and instead searching again for the last text I searched for.
In other words, with Eclipse mappings in IntelliJ I still have to perform the following steps to do a Ctrl+K
search for "foobar":
Ctrl+F
for search; IntelliJ will pick up the selected text "foobar".<Enter>
to search once for "foobar".<Esc>
to exit search mode.Ctrl+K
to search for the next occurrence of "foobar".In Eclipse I only have to do this:
Ctrl+K
to search for the next occurrence of "foobar" (regardless of what I searched for previously).How can I get the same "search for next occurrence of selected text" functionality IntelliJ IDEA?
Try the Quick Find plugin, which appears to emulate the Eclipse functionality more closely than the "Next Occurrence of the Word at Caret" action. Caveat: I have not tried it myself.