20

The Search mode seems to be selected to other but 'File Search', depending on the active perpective (debug/Java), when I press CTRL+H keyboard shortcut in Eclipse/STS, which forces me to, point to 'File Search', using my mouse etc, instead of letting me paste my search pattern right away from the clipboard.

Since 'File Search' mode, is the one that I use most, is there a way of auto selecting 'File Search' instead of 'Remote Search', 'Plug-in Search', etc., when I press CTRL + H in Eclipse/STS?

Chandrayya G K
  • 8,504
  • 4
  • 35
  • 65

1 Answers1

24

Yes there is a way.

Go to Window->Preferences type keys in the top left search box then you will get the below window. Type File search in the keys preference page.

enter image description here

Note that by default no short-cut key was assigned to File Search. Click on Binding text box and assign your own short cut key for File Search. Also you can change the context when this command should be active. To set context look at When text box.

Note that if nothing is selected in the active editor then by default previous search key will be used in File Search text box. If some thing is selected in the active editor then this will be used as search key. If you copied any thing out side the eclipse then your can directly paste this in File Search's Containing Text text box.

Chandrayya G K
  • 8,504
  • 4
  • 35
  • 65
  • 1
    You can also unbind the 'Open search dialog' from here and bind 'File Search' to Ctrl+H so that when you type Ctrl+H it will open the file search tab and not the java search tab – TwinPrimesAreEz Jul 18 '14 at 19:24
  • 10
    No unbinding is not required, what if user wants `Plugin Search, Remote Search, Java Search, Git search etc etc.`. Also you can customize search dialog tab appearances. Press Ctrl + H click on **Customize** button then select which search types you want and you can also choose **Remember last used search page** option, so that whenever user presses Ctrl+H then last used search tab will be focused automatically. – Chandrayya G K Jul 21 '14 at 03:51