This is a Visual Studio Code extension that makes it easily to search in current active editor. It is inspired by the emacs extension helm-occur.
Search only in current file displayed in the active editor. Automatically, the currently selected text is filled into the search query, and the current file is filled into "files to include" in the Search Panel.
// Only type ctrl+o when using Find.
// the query in Find is filled into the query in Search.
{
"key": "ctrl+o",
"command": "search-in-current-file.searchInCurrentFile",
"when": "editorFocus && findInputFocussed"
},
{
"key": "ctrl+cmd+o",
"command": "search-in-current-file.searchInCurrentFile",
"when": "editorFocus"
}