mogelbrod / quick-opener

Visual Studio Code plugin that makes it easy to work with files across the entire file system
https://marketplace.visualstudio.com/items?itemName=mogelbrod.quickopener
MIT License
4 stars 1 forks source link
vscode-extension

Quick Opener for Visual Studio Code

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.

Animated example

Features

Keybindings on Mac use in place of Ctrl.

Installation

  1. Navigate to the Quick Opener extension page within VS Code by either:
  2. Press the corresponding Install button

Extension contributions

Key bindings

The 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"
  },

Custom key bindings

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",
  }

Settings

Commands

Commands available while the plugin window is visible:

Disclaimer

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.

Credits