/vscode-search-in-current-file

The vscode extension to search in current file quickly

Primary LanguageTypeScriptMIT LicenseMIT

Search in Current File

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.

Demo

Commands

Search in Current File

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.

Useful Keyboard Shortcuts Example

// 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"
}