How do I hotkey directly to File Search tab in Ecl

2019-01-30 05:45发布

When I use CTRL+H I end up on the Java Search tab. I would very much like a shortcut to go directly to File Search instead. Is that possible?

See image here for what I'm talking about: enter image description here

9条回答
淡お忘
2楼-- · 2019-01-30 06:22

I would like to provide a workaround here: you can 'remember last used page' to avoid opening it over and over again.

enter image description here

查看更多
Fickle 薄情
3楼-- · 2019-01-30 06:24

UPDATE: user @muescha, in the comments underneath the question, just pointed out to me that I accidentally answered the wrong question! Nevertheless, it is still a valuable answer (just not to this question), so I'm leaving it.

My answer answers the question: How do I use a hotkey directly to search for a File in Eclipse?

Ctrl + Shift + R works fantastically! Use asterisks (*) for wildcards. It is very similar to the Ctrl + P fuzzy search in Sublime Text 3.

Sample searches using the Ctrl + Shift + R "Open Resource" search in Eclipse:

rea

enter image description here

*.txt

enter image description here

*32*f1*c

enter image description here

*3*1*c*h
Notice if you just put an asterisk * between every character in the search string it works just like Sublime Text 3's Ctrl + P "fuzzy search"! Beautiful!

enter image description here


Side note: you can also use the Search --> File menu dialog to search for files.

查看更多
欢心
4楼-- · 2019-01-30 06:26

You can just define a key binding that opens the file search:

  1. Go to Preferences > General > Keys
  2. Type "file search" in the search box. (If there are no results, and you have a really old Eclipse version, select the Include Unbound Commands check box.)
  3. Put the caret into the Binding text box and press the key combination you want to use:

enter image description here

You can either re-use the CTRL+H binding (delete the other binding in that case) or define another one (e.g. CTRL+SHIFT+H). To delete the other binding search for "Open Search Dialog" and click on Unbind Command.


Other solution: You could press CTRL+3 in your editor, type in "file s", press Enter. The next time you press CTRL+3 "File Search" is at the top.

查看更多
登录 后发表回答