STS Spring Tools 4及Eclipse中Ctrl+Shift+L快速搜索失效问题咨询
Hey there, let's figure out why your Ctrl+Shift+L shortcut isn't working as expected in STS 4.6.2! Here's what you need to know and how to fix it:
First, Let's Clarify Default Shortcuts
In Spring Tools 4 (built on Eclipse), Ctrl+Shift+L is actually the default shortcut for "Show Key Assist"—that's why it's triggering that menu instead of your quick search. This isn't necessarily a bug; it's likely either:
- Your custom shortcut settings from an older STS version got overwritten during the upgrade, or
- You were using a non-default shortcut mapping in the past.
Alternative Shortcuts for Quick Search
Depending on what "quick search" you're referring to, here are the default shortcuts you can use right away:
- Search for files/resources: Use
Ctrl+Shift+R(lets you search any file in your workspace) - Search for Java classes/interfaces: Use
Ctrl+Shift+T - Global quick access (search commands, files, classes, and more): Use
Ctrl+3—this is the all-in-one search tool most folks rely on as their "quick search" in Eclipse/STS.
How to Customize the Shortcut Back to Ctrl+Shift+L
If you really want to get Ctrl+Shift+L working for your quick search, you can reassign it in the settings:
- Open the Keys preferences: Either press
Ctrl+3and type "Keys", or go toWindow > Preferences > General > Keys - In the top search box, type the name of the quick search function you want (e.g., "Quick Access" for the global search)
- Select the function from the list, click the "Binding" input box, then press
Ctrl+Shift+L - A warning will pop up saying the shortcut is already assigned to "Show Key Assist"—just click "OK" to replace the binding (or pick a different shortcut if you still want to use Key Assist)
- Click "Apply and Close" to save your changes.
Is This a Bug?
Unlikely. STS 4.6.2 follows Eclipse's default shortcut mappings, and Ctrl+Shift+L has been the Key Assist shortcut in Eclipse for a long time. If this worked differently for you before, it's almost certainly due to custom settings that didn't carry over during the upgrade.
内容的提问来源于stack exchange,提问作者Bharathiraja

