fabiospampinato / vscode-open-in-application

Open an arbitrary file in its default app, or the app you want.
MIT License
19 stars 0 forks source link
application custom extension external open vscode

Open in Application

Logo

Open an arbitrary file in its default app, or the app you want.

This is customizable: you can provide a custom app for each extension, or even multiple apps for an extension and then manually pick the one to use.

Install

Follow the instructions in the Marketplace, or run the following in the command palette:

ext install fabiospampinato.vscode-open-in-application

Usage

It adds 1 command to the command palette:

'Open in Application' // Open the current file in its default app, or the app you want

You can also reach this command with a right click in the explorer.

Settings

{
  "openInApplication.applications": {} // Map between extensions and applications
}

The actual application's name to use is OS-dependant, for instance if you want to open Firefox under Ubuntu you have to use "firefox" (lowercase) in your settings. We use the open utility under the hood, everything that works with it will work here.

Example settings for custom application:

{
  "openInApplication.applications": {
    "html": "Firefox" // Always use Firefox for opening html files
  }
}

Example settings for custom applications:

{
  "openInApplication.applications": {
    "html": ["Google Chrome", "Firefox"] // Ask which application to use when opening html files
  }
}

License

MIT © Fabio Spampinato