Go to File (Ctrl+P): pre-fill filter with editor selection (JetBrains-style)
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
### Description
JetBrains IDEs pre-fill the "Go to File" filter with the current editor selection.
VS Code doesn't do this for Go to File (`Ctrl+P`) today, even though it already does something similar for **Find in Files** (`Ctrl+Shift+F`) and **Go to Symbol** (`Ctrl+T`).
### Proposed behavior
When there is an explicit, non-empty text selection in the active editor and the user presses `Ctrl+P`, Go to File should pre-fill its filter field with that selection.
Should **not** trigger on word-at-cursor (no selection) to avoid surprising, noisy filters — this should be selection-only, independent of the `editor.find.seedSearchStringFromSelection` setting.
### Demo
### Implementation
Already implemented in #330538, using the existing `getSelectionSearchString` helper (the same utility Go to Symbol uses).
Contributor guide
Assessment
This issue has not been assessed yet.