A VS Code extension that enhances the quick open functionality with file previews, similar to Telescope in Neovim.
YOU HAVE TO INSTALL FZF ON YOUR SYSTEM FOR THIS EXTENSION TO WORK!
This implements the telescope features I use most myself, which are fuzzy finding files and accessing Oldfiles, if you need Live Grep functionality please check out Periscope.
Screen.Recording.2025-03-20.at.15.34.36.mov
- Fuzzy search for files by name with real-time preview, direct replacement for Ctrl/Command + P file search
- Shows open files and workspace files immediately when opened
- Browse most recently used editors (Oldfiles in telescope) with preview functionality
- Preserves focus on the search dialog while previewing files
- Returns to your previous file when canceling a search
- Configurable exclusion patterns for directories and files
- Open
buffereditor picker with preview
- Search
Search Preview: Quick Open with Previewin the command pallete to open the enhanced quick open dialog (Look below to make keybinds work) - You'll immediately see a list of currently open files and other workspace files
- Type to search for specific files by name using fuzzy matching
- Use arrow keys to navigate between results
- Press Enter to select and open the file permanently
- Press Escape to cancel and return to your previous file
- Search
Search Preview: Show All Editors by Most Recently Used with Previewin the command pallete to open the most recently used editors dialog (Look below to make keybinds work) - You'll see a list of currently open editors sorted by most recently used
- Navigate through the list to preview each file
- Type to filter the list of open editors using fuzzy matching
- Press Enter to select and open the editor permanently
- The currently open editor will not show up in this list, so you can just run the command and press enter to go to the last file you were at.
- Run the "Configure Search Settings" command from the command palette
- Or manually edit your
settings.jsonfile with the options below
This extension provides several settings to customize its behavior:
searchPreview.search.excludeDirectories: Directories to exclude from search results- Default:
["node_modules", ".git", "venv", "env", "dist", "build"]
- Default:
searchPreview.search.excludePatterns: File patterns to exclude from search results (glob patterns)- Default:
["**/*.min.js", "**/*.log", "**/*.lock", "**/package-lock.json"]
- Default:
searchPreview.search.maxResults: Maximum number of search results to display- Default:
100
- Default:
search-preview.quickOpenWithPreview: Quick open files with preview functionalitysearch-preview.showAllEditorsByMostRecentlyUsed: Show all editors by most recently used with previewsearch-preview.openSearchSettings: Open the search settings configuration
You can customize the keybindings in your keybindings.json file. Here are some examples:
// Use Alt+P for search preview
{
"key": "alt+p",
"command": "search-preview.quickOpenWithPreview"
},
// Use Shift+Alt+P for search preview
{
"key": "shift+alt+p",
"command": "search-preview.showAllEditorsByMostRecentlyUsed"
},
If you're using the VSCode Vim extension, you can integrate Search Preview into your Vim workflow by adding these to your settings.json:
"vim.leader": " ",
"vim.normalModeKeyBindings": [
{
"before": ["<leader>", "f","f"],
"commands": ["search-preview.quickOpenWithPreview"]
},
{
"before": ["<leader>", "<leader>"],
"commands": ["search-preview.showAllEditorsByMostRecentlyUsed"]
}
]- VS Code 1.90.0 or higher
- Clone the repository
- Run
npm installto install dependencies - Run
npm run watchto start the TypeScript compiler in watch mode - Press F5 to launch a new VS Code window with the extension loaded
- Edit files in the
srcdirectory to modify the extension - Reload the VS Code window to see changes (
Ctrl+RorCmd+Ron Mac)
Enjoy!