Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>FindItFaster: SonarNew to Visual Studio Code? Get it now.
FindItFaster: Sonar

FindItFaster: Sonar

stoffej

|
10 installs
| (0) | Free
FindItFaster fork with query filter syntax, current-file search, persisted fzf history.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FindItFaster: Sonar

pong… pong… is da sound of the Sonar

Fork of FindItFaster. Linux + WSL. File/content search powered by fzf, rg, bat.

What's new

  • 0.1.5 — Fixes TYPE_FILTER in find-within-open-files (was a no-op). README updates.
  • 0.1.4 — Filetype pickers (alt+j / alt+u), // tokens filter syntax.
  • 0.1.3 — Preflight for missing tools. WSL paste.
  • 0.1.1 — First Sonar release.

What's different from upstream

  • pattern // [type|!type|glob|!glob] ... filter syntax in find-within-files
  • New commands: search within current file, search within open files
  • Persisted fzf history (~/.cache/find-it-faster/history)
  • ctrl+x clears, ctrl+v pastes (wl-paste / xclip / powershell.exe)
  • findFiles.fzfDefaultCommand for custom listers (git ls-files, fd)
  • Single search root = terminal cwd
  • Linux only (WSL supported); macOS / native Windows removed

Install

sudo apt-get install -y fzf ripgrep bat && sudo ln -sf /usr/bin/batcat /usr/local/bin/bat

Missing fzf or rg at runtime → clear error in the terminal (doesn't auto-close). Missing bat → preview disabled, warning only.

WSL on Windows

  1. wsl --install -d Ubuntu (PowerShell)
  2. Install deps above in WSL
  3. VSCode: install Remote - WSL, reopen folder in WSL
  4. Install FindItFaster: Sonar into the WSL window

ctrl+v reads the Windows clipboard via powershell.exe.

Commands

Prefix: Sonar: in the command palette.

Command Keybinding
Search file ctrl+shift+j
Search file (with type filter) ctrl+shift+alt+j
Search within files ctrl+shift+u
Search within files (with type filter) ctrl+shift+alt+u
Search within current file —
Search within open files —
Resume last search —

The *With type filter variants pre-narrow rg via -t <type> — faster than any query-level filter on big repos.

Query syntax

Command Matcher Syntax
Search file fzf fzf extended-search
Search within current file fzf fzf extended-search
Search within files rg rg regex + // tokens
Search within open files rg rg regex + // tokens

fzf extended-search syntax (Search file, Search within current file)

Token Meaning
sbtrkt fuzzy match
'wild exact match
^music starts with music
.mp3$ ends with .mp3
!fire NOT fuzzy fire
!^music NOT starting with music
!.mp3$ NOT ending with .mp3
a \| b a OR b
a b a AND b

Examples:

.svg$                      # every .svg file
icons .svg$                # .svg files matching "icons" fuzzily
'exact-name                # filenames containing the literal "exact-name"
^src .ts$ | .tsx$          # TypeScript under src/
config | settings .json$   # config.json or settings.json
test !.spec.               # anything with "test" but not ".spec."

rg regex + // tokens file filter (Search within files, Search within open files)

Left of // = rg regex. Right = space-separated file filters.

Token Effect rg flag
c rg type (e.g. .c/.h) -t c
!c exclude C files -T c
*.c glob -g '*.c'
!*_test.c negated glob -g '!*_test.c'
src/** top-level src/ only -g 'src/**'
!node_modules/** top-level node_modules/ only -g '!node_modules/**'
.md shorthand for *.md -g '*.md'

Glob vs type: contains *?/. → glob, otherwise rg type. rg --type-list for types.

Path globs are root-anchored. src/** matches top-level src/ only — use **/src/** for nested. Same for !node_modules/**.

Examples:

todo // c                       # "todo" in C files
handler // py !*_test.py        # "handler" in Python, skip test files
foo // src/**                   # "foo" under top-level src/ (use **/src/** for nested)
config // *.json !**/dist/**    # "config" in JSON, skip dist dirs
^import .* from // ts           # regex on the left, file filter on the right

Empty pattern: // py lists every .py file.

Recipes

First word = which command to run.

Find files

Search file    .svg$                      every SVG
Search file    ^src/ .ts$ | .tsx$         TS/TSX under src/
Search file    'README                    literal "README" in name
Search file    migration !.sql$           "migration" but not .sql
Search file    !test !spec                neither test nor spec
Search file    ^docs .md$                 markdown under docs/
Search file    config | settings .json$   config.json or settings.json

Search within files

Search within files   TODO // py                   TODOs in Python
Search within files   ^def\s+\w+ // py             Python function defs
Search within files   use[A-Z]\w+ // ts            React hooks (ts covers .tsx)
Search within files   from 'lodash' // ts js       lodash imports
Search within files   ^class\s+\w+ // java kotlin  class declarations
Search within files   https?://\S+ // md           URLs in markdown
Search within files   TODO|FIXME|XXX // !*_test.*  todos outside tests
Search within files   FIXME // src/** !*.lock      fixmes under src/, not lockfiles
Search within files    // py                       list all .py files

Search within current file

Search within current file   .error$          lines ending in "error"
Search within current file   ^return          lines starting with `return`
Search within current file   'throw           lines with literal "throw"
Search within current file   TODO | FIXME     either tag

Fastest: rg pre-filter (large repos)

ctrl+shift+alt+j  → "svg"    # only .svg files
ctrl+shift+alt+u  → "py"     # within .py only

Tips

  • ctrl+p / ctrl+n — query history (30 entries, persisted)
  • ctrl+v — paste (needs fzf ≥ 0.38 + clipboard tool)
  • ctrl+x — clear query

Settings

@ext:stoffej.fif-sonar in settings. Keys under fif-sonar.*.

General

Key Default Purpose
general.hideTerminalAfterSuccess true Hide terminal after pick.
general.hideTerminalAfterFail true Also hide on cancel.
general.clearTerminalAfterUse true clear before hiding.
general.killTerminalAfterUse true Dispose terminal fully.
general.showMaximizedTerminal false Maximize while picking.
general.useGitIgnoreExcludes true Honor .gitignore.
general.useWorkspaceSearchExcludes true Honor search.exclude.
general.batTheme "1337" Preview theme.
general.openFileInPreviewEditor false Open as Preview tabs.
general.restoreFocusTerminal false Re-focus prior terminal after pick.
general.useTerminalInEditor true Terminal in editor area.
general.shellPathForTerminal "/bin/bash" Shell used.
general.shellArgsForTerminal ["--norc", "--noprofile"] Skip rc for fast spawn.

Find files

Key Default Purpose
findFiles.showPreview true bat preview pane.
findFiles.previewCommand (built-in) {} = filename.
findFiles.previewWindowConfig (built-in) fzf --preview-window.
findFiles.fzfDefaultCommand "" Custom lister; empty = rg --files.

Find within files

Key Default Purpose
findWithinFiles.showPreview true Preview pane.
findWithinFiles.previewCommand (built-in) {1} = file, {2} = line.
findWithinFiles.previewWindowConfig (built-in) --preview-window.
findWithinFiles.fuzzRipgrepQuery false Whitespace → .*.

Advanced

Key Default Purpose
advanced.disableStartupChecks true Skip per-activation tool checks.
advanced.useEditorSelectionAsQuery true Seed query from selection.

Example settings

// git ls-files as lister
"fif-sonar.findFiles.fzfDefaultCommand": "git ls-files --cached --others --exclude-standard"

// keep terminal after pick
"fif-sonar.general.hideTerminalAfterSuccess": false,
"fif-sonar.general.killTerminalAfterUse": false

// use zsh
"fif-sonar.general.shellPathForTerminal": "/bin/zsh",
"fif-sonar.general.shellArgsForTerminal": []

// loose matching
"fif-sonar.findWithinFiles.fuzzRipgrepQuery": true

FAQ

Ctrl+K doesn't move up in fzf. Set "terminal.integrated.allowChords": false.

Files from other folders don't show up. Picker uses terminal cwd. Open the wider folder, or set findFiles.fzfDefaultCommand.

Terminal closes before I can read an error. On precondition failure the extension keeps it open. If it still disappears, a workspace override on hideTerminalAfterFail may be overriding the extension.

ctrl+v doesn't paste. Requires fzf ≥ 0.38 + one of wl-paste / xclip / powershell.exe.

Preview empty. bat missing. Install it.

Native Windows? Not supported. Use WSL.

Credits

Thanks to Tom Rijndorp for FindItFaster — this fork is built on it.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft