Is it possible to assign a shortcut to this function?
4 Answers
CTRL+K
forward and CTRL+SHIFT+K
back :
Highlight a word or phrase you want to search for. Hitting CTRL+K will take you to the next without having to open the Search control window. Please also upvote @feedbackloop for his comment here/below with the shortcut to go to the previous!
I'm using CFEclipse. I don't know if the same applies to what workbench you're using.
-
9
-
1
The solution I use to go to next/previous search match even when the search result view is not focused is as follows:
- Use the prev/next shortcuts as usual when the search view is focused: Ctrl + . and Ctrl + ,.
- Configure the same keys to focus the search result view when it's not focused. Window > Preferences > General > Keys - Search: "Show View (Search)", Press "Copy Command", Set binding: "CTRL+.", when: "Editing Text" (and similar configuration for "CTRL+,").
That way these keyboard shortcuts will work both when search results are active and inactive.
Note: In order not to sacrifice the ability to use shortcut keys to navigate to previous/next results in other views (e.g. Problems view, etc) you can assign different keys for navigating the currently focused view.
-
3Great solution. P.S.: After switching through search results, F12 focuses the editor again (setting "Activate Editor").– AndiDogMar 19, 2015 at 11:11
-
If you hover over the arrows to get to the next or previous result, eclipse shows you the shortcut: Ctrl + . and Ctrl + ,.
-
16What about doing this without having to active the search result window first? Nov 16, 2010 at 8:51
-
1@ArneEvertsson, I posted below how to achieve this without having to activate the search result window first Jan 15, 2014 at 18:46
The best way I could find was to use AutoHotkey. Eg, when ctrl+alt+right is pressed, it focuses the search view (+!qs), does next (^.), then focuses the editor (^e).
#If WinActive("ahk_exe eclipse.exe") && WinActive("ahk_class SWT_Window0")
^!Right::Send +!qs^.^e
^!Left::Send +!qs^,^e
#If
-
1This is great thank you. I used {enter} instead of ^e as enter opens editor and focuses result whereas eclipse neon popped up a menu with ^e. Oct 23, 2019 at 16:20
-
Ah probably I customized my key bindings to use ^e (ctrl+e) to focus the editor.– NateSOct 25, 2019 at 7:52