lfurzewaddock / vscode-opn

Opens files in the default application for the file type set in the OS
MIT License
5 stars 2 forks source link

CTRL+ALT+0 doesn't do anything #9

Closed sethidden closed 5 years ago

sethidden commented 5 years ago

Hey, so I installed this and I've ran into a few issues:

  1. The CTRL+ALT+0 extension doesn't do anything. The extension installation process didn't create a keybindings.json entry for me. I tried creating my own, but after I do

    {
    "key": "ctrl+alt+0",
    "command": "vscode-opn.[cursor is here]"
    }

    after I press CTRL+Space to open intellisense I don't get any suggestions, so I don't really know which command do I bind this to.

  2. Not all settings autocomplete in user settings JSON.

image
eg. perLang is missing and the sub-options in perLang are also missing.

Did the extension stop working due to a breaking change in VSCode (broken for everybody) or is this an issue with my environment?

I did disable all extensions and enabled only vscode-opn and the issue still persisted.

VScode info

Version: 1.38.0
Commit: 3db7e09f3b61f915d03bbfa58e258d6eee843f35
Date: 2019-09-03T21:51:09.716Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0

System info image

OS: Linux x64 5.0.0-27-generic snap

lfurzewaddock commented 5 years ago

The command is CTRL+ALT+O

Please note: the last key is letter O, not number 0.

This extension was developed prior to VS Code release 1.32 when keybindings.json was introduced.

By default the extension command will open the current active text based file in the default program set by your OS. You may change the program for which each text file is opened per language.

For example to open .html files in Google Chrome, edit your settings.json file adding;


  // vscode-opn 'opnOptions' array of objects to provide args to the opn command for each language
    "vscode-opn.perLang": {
        "opnOptions": [
        {
            "forLang": "html",
            "openInApp": "chrome"
        }
        ]
    },

Note: The app name set for openInApp is platform dependent. For Google's Chrome web browser for example, you would use google chrome on OS X, google-chrome on Linux and chrome on Windows.

sethidden commented 5 years ago

I recently changed my machine and to my surprise "perLang" started appearing in IntelliSense. I remember checking both O and 0 for the shortcut, but turned out the issue was I needed to restart VSCode.

Sorry for the trouble.