FindItFaster: Sonar
pong… pong… pong… — is da sound of the Sonar
Personal fork of FindItFaster by Tom Rijndorp. Linux-only.
Finds files and text within files using fzf, rg, and bat.
What's different from upstream
- Query filter syntax in find-within-files:
pattern // [type|!type|glob|!glob] ... (e.g. todo // c py !*_test.c)
- Search within current file and search within open files (new commands)
- Persisted fzf history across sessions (
~/.cache/find-it-faster/history)
ctrl+x clears the query, ctrl+v pastes from wl-paste in all search UIs
findFiles.fzfDefaultCommand setting lets you swap the file lister (e.g. git ls-files, fd)
- Simplified search-path model: searches run in the terminal's cwd (workspace root) — removed
additionalSearchLocations, searchWorkspaceFolders, searchCurrentWorkingDirectory, and the list search locations command
- Faster terminal spawn (skips shell profile loading by default)
- Windows/macOS support removed
Requirements
fzf, rg, bat, sed on PATH. On Debian/Ubuntu:
sudo apt-get install -y fzf ripgrep bat && sudo ln -sf /usr/bin/batcat /usr/local/bin/bat
Commands + default keybindings
| Command |
Keybinding |
| Search files |
ctrl+shift+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 |
— |
Query filter syntax (search within files)
Split the query with // to add inline rg filters: pattern // token token ...
| Token |
Effect |
rg flag |
c |
only .c/.h files (rg type) |
-t c |
!c |
exclude C files |
-T c |
*.c |
only .c files |
-g '*.c' |
!*_test.c |
exclude test files |
-g '!*_test.c' |
src/** |
only under src/ |
-g 'src/**' |
!node_modules/** |
exclude node_modules |
-g '!node_modules/**' |
A token is treated as a glob if it contains *, ?, /, or . — otherwise it's an rg type name. See rg --type-list for available type names.
Examples
todo // c # "todo" in C files
handler // py !*_test.py # "handler" in Python, skip test files
useState // ts tsx # "useState" in TypeScript/TSX
foo // src/** # "foo" under src/
config // *.json !**/dist/** # "config" in JSON, skip dist dirs
api // !node_modules/** # "api", skip node_modules
Empty pattern + tokens lists all matching files: // py → everything in Python files.
Tips
- Query history:
ctrl+p / ctrl+n step back/forward through previous queries. History is persisted across sessions under ~/.cache/find-it-faster/history (size 30).
- Paste from clipboard:
ctrl+v pastes via wl-paste (Wayland). Useful for dumping a symbol from outside the editor into the search.
- Clear the query:
ctrl+x wipes the search input — handy after pasting a large chunk of text.
Settings
Open VSCode settings and search @ext:kristoffer.fif-sonar. All keys are namespaced under fif-sonar.*.
General
| Key |
Type |
Default |
What it does |
general.hideTerminalAfterSuccess |
boolean |
true |
Hide the Sonar terminal after a successful pick. |
general.hideTerminalAfterFail |
boolean |
true |
Hide it after cancel/failure too. |
general.clearTerminalAfterUse |
boolean |
true |
Send clear before hiding — keeps the terminal tidy if you reuse it. |
general.killTerminalAfterUse |
boolean |
true |
Dispose the terminal entirely so your previous terminal regains focus. Slightly slower (re-spawn on next use). |
general.showMaximizedTerminal |
boolean |
false |
Maximize the terminal panel while picking. |
general.useGitIgnoreExcludes |
boolean |
true |
Honor .gitignore when listing files. |
general.useWorkspaceSearchExcludes |
boolean |
true |
Honor VSCode's search.exclude globs. |
general.batTheme |
string |
"1337" |
Bat theme for previews (run bat --list-themes). |
general.openFileInPreviewEditor |
boolean |
false |
Open picked files as VSCode Preview tabs. |
general.restoreFocusTerminal |
boolean |
false |
Re-focus your previous terminal after the pick. |
general.useTerminalInEditor |
boolean |
true |
Put the Sonar terminal in the editor area instead of the panel. |
general.shellPathForTerminal |
string |
"/bin/bash" |
Shell used for the Sonar terminal. Leave as bash for predictable scripts. |
general.shellArgsForTerminal |
array |
["--norc", "--noprofile"] |
Skips your shell config for a fast spawn. Clear this if rg/fzf/bat only live on PATH via your shell rc. |
Find files
| Key |
Type |
Default |
What it does |
findFiles.showPreview |
boolean |
true |
Show the bat-preview pane when picking files. |
findFiles.previewCommand |
string |
(built-in) |
Override the preview command. {} = filename. |
findFiles.previewWindowConfig |
string |
(built-in) |
fzf --preview-window string (e.g. top,50%). |
findFiles.fzfDefaultCommand |
string |
"" |
Command whose stdout is piped into fzf. Empty = use rg --files. Runs in the terminal's cwd. |
Find within files
| Key |
Type |
Default |
What it does |
findWithinFiles.showPreview |
boolean |
true |
Show the bat-preview pane. |
findWithinFiles.previewCommand |
string |
(built-in) |
Override. {1} = filename, {2} = line. |
findWithinFiles.previewWindowConfig |
string |
(built-in) |
fzf --preview-window string. |
findWithinFiles.fuzzRipgrepQuery |
boolean |
false |
Treat whitespace in the query as .* (loose matching). |
Advanced
| Key |
Type |
Default |
What it does |
advanced.disableStartupChecks |
boolean |
true |
Skip per-activation checks for fzf/rg/bat. |
advanced.useEditorSelectionAsQuery |
boolean |
true |
Seed the fzf query with the current editor selection. |
Example settings
Drop these into your VSCode settings.json to try different flavors.
Use git ls-files so the file picker only sees tracked files (fast in big monorepos):
"fif-sonar.findFiles.fzfDefaultCommand": "git ls-files --cached --others --exclude-standard"
Use fd instead of rg --files:
"fif-sonar.findFiles.fzfDefaultCommand": "fd --type f --hidden --exclude .git"
Only files changed since main:
"fif-sonar.findFiles.fzfDefaultCommand": "git diff --name-only --diff-filter=ACMR main...HEAD"
Keep the Sonar terminal visible after a pick, don't clear it:
"fif-sonar.general.hideTerminalAfterSuccess": false,
"fif-sonar.general.hideTerminalAfterFail": false,
"fif-sonar.general.clearTerminalAfterUse": false,
"fif-sonar.general.killTerminalAfterUse": false
Match your terminal's shell config (instead of --norc --noprofile):
"fif-sonar.general.shellPathForTerminal": "/bin/zsh",
"fif-sonar.general.shellArgsForTerminal": []
Custom bat theme + open results as Preview tabs:
"fif-sonar.general.batTheme": "OneHalfDark",
"fif-sonar.general.openFileInPreviewEditor": true
Loose matching in find-within-files (whitespace = .*):
"fif-sonar.findWithinFiles.fuzzRipgrepQuery": true
Scope fzf env vars to this extension only — guard in your shell config with $FIND_IT_FASTER_ACTIVE:
if [[ $FIND_IT_FASTER_ACTIVE -eq 1 ]]; then
FZF_DEFAULT_OPTS='--height=50%'
fi
FAQ
Ctrl+K doesn't navigate fzf upward. VSCode is waiting for a chord. Set "terminal.integrated.allowChords": false.
Files from other folders don't show up. The picker runs in the terminal's cwd (the workspace root by default). Open the folder as a workspace, or set findFiles.fzfDefaultCommand to a command that walks wider.
Credits
Huge thanks to Tom Rijndorp for the original FindItFaster — this fork stands entirely on that work. Go star the upstream repo.