How do I hotkey directly to File Search tab in Eclipse

前端 未结 9 907
别那么骄傲
别那么骄傲 2020-12-23 02:25

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?

S

相关标签:
9条回答
  • 2020-12-23 03:06

    I actually think the best (and easiest way) is to simply open the search dialog (ctrl + h), hit customize, and then select the checkbox for "Remember last page used." Then tab over to the File Search once. So long as that is the last search tab you used, it will always open there. The advantage to this is that you don't lose easy access to the other tabs, should you actually need them! (working in Eclipse Kepler).

    Customize view

    0 讨论(0)
  • 2020-12-23 03:06

    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

    *.txt

    *32*f1*c

    *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!


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

    0 讨论(0)
  • 2020-12-23 03:09

    As far as I know, the search window tab depend of the open file you're on when calling the search function. So, for example if your on a web.xml file, it will open the "plug-in search" instead of the "java-search".

    Edit: there is a way to force the default open tab, by assigning a shortcut to the "File Search" action in the "Keys" preference panel.

    0 讨论(0)
  • 2020-12-23 03:11

    Another option is to open the search dialog (Ctrl+H) then click customize and hide java and task search tabs, next time you do Ctrl+H, file search will be the only one showing, thus it will be selected by default

    0 讨论(0)
  • 2020-12-23 03:12

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

    0 讨论(0)
  • 2020-12-23 03:13

    Probably this feature came recently [confirmed its there in since Juno] and looks intelligent. Press Ctrl+H --> Customize --> [Checkbox] Remember last used page. This way you are not far from other options if required anytime. So if you use File search often then you will not get annoyed getting what you last chose.

    0 讨论(0)
提交回复
热议问题