An extension that makes it easy to open files anywhere:
- …outside the VS Code workspace
- …relative to the currently open file
- …from a given git branch/tag/commit
- …from the list of modified files in the git working tree

Installation
- Navigate to the Quick Opener extension page within VS Code by either:
- Press the corresponding Install button
- (optional) Add keybindings for additional functionality
Features
Note: Key bindings on Mac use ⌘ in place of Ctrl.
Open/create any local file
- Show the Quick Opener picker by pressing Ctrl-O
- Open any path across the file system using only the keyboard - avoid the native file system popups
- Fuzzy path matching using the built-in VS Code fuzzy matcher
- Starts in directory of current file (if open) to make relative navigation quick and easy
- Begin entering any absolute path (or a pre-configured prefix) to quickly locate files outside the current workspace
- Navigate to parent directory by entering
.. or pressing Ctrl-U
- Additional functionality available via window and item buttons, as well as keybindings:
- Enter
- File: Open file
- Directory: Change relative root directory
- Ctrl-O
- File: Open in split editor
- Directory: Add/remove directory to/from workspace
- Ctrl-Shift-O
- Directory: Open directory in new window
- Ctrl-U - Cut off last part of the input path / navigate to parent directory
- Ctrl-N - Create new file (or directory if input ends with a slash) at the given path,
with ancestor directories created in the process
- Tab - Replace input value with selected item
Open by git ref/revision
Browse and open files as they existed from any git branch, tag, or commit SHA via the
quickOpener.showRevisionPicker command (Quick Opener: Open by Revision). The
command will by default first prompt for a ref, and upon selection trigger the
Open File at Revision command.
This command is not bound to a keyboard shortcut by default; see Custom key bindings.
- Lists all local/remote branches and tags, grouped by type
- Type any commit SHA to use it directly without selecting from the list
- Selecting a ref opens a file revision picker, enabling opening of any file that existed in that ref
- Additional functionality is available via item buttons and keybinds:
- Ctrl-O - Open a diff view of changes in the given ref
- Ctrl-D - Diff the current working tree against this ref
- Toggle visibility of additional metadata via the title bar buttons
- Ctrl-E - Toggle description format between short SHA or custom metadata
- Ctrl-M - Toggle commit message visibility
- Customize metadata format via
quickOpener.refDescriptionFormat setting
Example keybindings:
See Commands for list of available arguments.
{ // Pick git revision, then file from revision to open
"key": "ctrl+g /",
"command": "quickOpener.showRevisionPicker",
},
{ // Pick git revision to open current file from
"key": "ctrl+g o",
"command": "quickOpener.showRevisionPicker",
"args": { "skipFileSelection": true },
},
Open file at revision / in working tree
The quickOpener.showRevisionFilePicker command (Quick Opener: Open File at Revision)
can be used standalone, without first selecting a ref via the revision picker.
This command is not bound to a keyboard shortcut by default; see Custom key bindings.
- By default (no
ref argument) shows all files changed in the working tree (staged & unstaged changes vs HEAD)
- Provide a
ref argument to list files at any branch, tag, or commit SHA instead
- Ctrl-M - Toggle between all files at the ref and only changed files via the title bar button
- Additional functionality is available via item buttons and keybinds:
- Ctrl-O - Open in split editor
- Ctrl-Shift-O - Diff the file against its parent commit
- Ctrl-D - Diff the current working tree against the file at this ref
Extension contributions
Commands
quickOpener.show: Show the Quick Opener picker.
quickOpener.showRevisionPicker: Show the Open by Revision picker, listing all git branches and tags.
Selecting a ref opens the Open File at Revision picker for that ref.
Accepts an optional object argument:
branches = true - include branches in the list
tags = true - include tags in the list
file = '${relativeFile}' - pre-fill the file input
skipFileSelection = false - Open file immediately (if it exists) after selecting revision - this will also change the diff item actions to only include the file
initialValue = '' - pre-fill the revision input
filterByStatus?: string - forwarded to the file picker; filter files by git status letter(s) (e.g. 'AM')
quickOpener.showRevisionFilePicker: Show a picker listing files at a given git ref.
Accepts an optional object argument:
ref - branch name, tag, or commit SHA to list files from.
Omit (or leave unset) to show files changed in the working tree (staged + unstaged vs HEAD).
initialValue?: string - pre-fill the search input
filterByStatus?: string | true - only show files whose git diff status letter appears in this
string. Supported letters: A (added), C (copied), D (deleted), M (modified),
R (renamed), T (type change). Pass true to filter by any change.
Example: 'AM' shows only added and modified files.
Available while any picker is visible:
quickOpener.triggerAction: Trigger a window (title bar) button action.
Expects a single argument:
number - 1-based index of the button to trigger (default: 1)
string - ID of the button action to trigger. Available action IDs depend on the active picker:
quick: createFile, createDirectory, workspaceAdd, workspaceRemove, openWindow
revision: toggleDescription, toggleMessage
revision-file: toggleChanged, openChanges, openDiff
quickOpener.triggerItemAction: Trigger a button action on the currently selected item.
Expects a single argument:
number - 1-based index of the button to trigger (default: 1)
string - ID of the button action to trigger. Available action IDs depend on the active picker:
quick: openSplit, workspaceOpen, workspaceAdd, workspaceRemove, openWindow
revision: openChanges, openDiff
revision-file: openSplit, openChanges, openDiff
Available while the quickOpener.show picker is visible:
quickOpener.triggerTabCompletion: Replace the input value with the selected item path.
quickOpener.popPath: Go upwards in the path by chopping off the last part of the input (if present), or by navigating to parent directory.
Key bindings
The default behaviour of the extension is to take over the standard key binding to open a file/folder:
Ctrl-O (Mac: ⌘-O).
You can configure key bindings from within vscode via Open Keyboard Shortcuts, or by editing
keybindings.json
directly. If you wish to use another key binding you can append the following to it:
{
"key": "cmd+o", // Revert the binding back to the editor default
"command": "-quickOpener.show"
},
{
"key": "cmd+shift+o", // New binding to use
"command": "quickOpener.show"
},
Custom key bindings
Examples of key bindings for features not bound by default:
{ // Pick git revision, then file from revision to open
"key": "ctrl+g /",
"command": "quickOpener.showRevisionPicker",
},
{ // Pick git revision to open current file from
"key": "ctrl+g o",
"command": "quickOpener.showRevisionPicker",
"args": { "skipFileSelection": true },
},
{ // Pick changed file from git working tree
"key": "ctrl+g m",
"command": "quickOpener.showRevisionFilePicker",
},
A when condition can be specified to limit a key bind to when a picker is visible, with the following options:
inQuickOpener - when any picker is visible
inQuickOpener == 'quick' - file picker visible
inQuickOpener == 'revision' - revision picker visible
inQuickOpener == 'revision-file' - revision file picker visible
{ // In quick picker: Open selected directory in new window
"when": "inQuickOpener == 'quick'",
"command": "quickOpener.triggerAction",
"args": "openWindow",
"key": "ctrl+shift+n",
},
{ // In any picker: Trigger first visible action for item (action depends on item type)
"when": "inQuickOpener", // when any quick picker is visible
"command": "quickOpener.triggerItemAction",
"args": 1,
"key": "ctrl+t",
},
Settings
quickOpener.fallbackDirectory: Directory to start in when there's no workspace/file open in the editor. Supports vscode variables.
Default value: "${userHome}"
quickOpener.prefixes: Mapping of path prefixes to their expanded paths. A path starting with any of these strings followed by a directory separator will be expanded to the corresponding path. Supports vscode variables.
Default value: { "~": "${userHome}", "@": "${workspaceFolder}" }
quickOpener.exclude: List of directory/file names to exclude from the results.
Compared against the name of each path component.
Default value: ["node_modules", ".git", ".DS_Store"]
quickOpener.icons: Show or hide icons in the quick picker.
Default value: true
quickOpener.timeout: Maximum time (in ms) for scanner to run between input and showing results.
Set to 0 to disable recursive search.
Default value: 200
quickOpener.maxCandidates: Maximum number of paths to include in the list VS Code fuzzy matches against.
Lower values improve UI responsiveness at the risk of fewer nested directories being included in the list.
Default value: 10000
quickOpener.refDescriptionFormat: Format string for revision descriptions in the "Open by Revision" picker
when the custom description style is active (toggled via the info button in the picker).
Default value: "{commitDate} - {authorName}"
Available placeholders:
{name}
{commit}
{message}
{authorName}
{authorEmail}
{authorDate}
{commitDate}
Date keys support optional formatting, e.g. {commitDate:YYYY-MM-DD}. Supported date tokens:
YYYY / YY
MMM / MM
DD / D
HH / H
mm
ss
Credits
- Icon: Created with the assistance of DALL·E 2