A plugin that makes it easy to open files outside the VS Code workspace (or relative to the current file) using a quick pick window.
Keybindings on Mac use ⌘ in place of Ctrl.
..
or pressing Ctrl-Umogelbrod.quickopener
from the VS Code Extensions sidebarThe default behaviour of the plugin is to take over the standard key binding to open a file/folder: Ctrl-O (Mac: ⌘-O).
If you wish to use another key binding you can append the following to keybindings.json:
{
"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"
},
Example of how to define custom key bindings:
{
"when": "inQuickOpener", // limit binding to when plugin is visible
"command": "quickOpener.triggerItemAction",
"args": 1, // trigger first visible action for item (depends on item type)
// "args": 2, // OR trigger second visible action for item (depends on item type)
"key": "ctrl+shift+o",
},
{
"when": "inQuickOpener",
"command": "quickOpener.triggerAction",
"args": ["create"], // create file/directory
"key": "ctrl+n",
}
quickOpener.fallbackDirectory
: Directory to start in when there's no workspace/file open in the editor. Supports vscode variables."${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.{ "~": "${userHome}", "@": "${workspaceFolder}" }
quickOpener.exclude
: List of directory/file names to exclude from the results.
Compared against the name of each path component.["node_modules", ".git", ".DS_Store"]
quickOpener.timeout
: Maximum time (in ms) for scanner to run between input and showing results.
Set to 0 to disable recursive search.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.10000
quickOpener.show
: Show the Quick Opener picker.Commands available while the plugin window is visible:
quickOpener.popPath
: Go upwards in the path by chopping off the last part of the input (if present), or by navigating to parent directory.quickOpener.triggerAction
: Trigger an action using the current input as path.quickOpener.triggerItemAction
: Trigger an action using the currently selected item as path.quickOpener.triggerTabCompletion
: Replace the input value with the selected item path.The Create directory/file functionality will attempt to create directories when necessary. This should not cause any data to be lost or overwritten, but I can unfortunately not guarantee that it will never happen in every possible situation.