【问题标题】:How to associate .install file extension and PKGBUILD file name with shell scripts in VSCode?如何将 .install 文件扩展名和 PKGBUILD 文件名与 VSCode 中的 shell 脚本相关联?
【发布时间】:2016-09-17 10:47:36
【问题描述】:

在 Visual Studio Code 中,我尝试将 *.install(即扩展名为 .install 的文件)和 PKGBUILD 文件与 shell 脚本语法高亮相关联,使用:

// Place your settings in this file to overwrite the default settings
{
    "file.associations": {
        "PKGBUILD": "shell",
        "*.install": "shell-script",
        "*.desktop": "ini"
    }
}

但它没有工作(对于任何一个文件名/扩展名),也就是说,两个文件名/扩展名都没有从 shell 中获得语法高亮。在查看了 shellscript 包的源代码 (https://github.com/Microsoft/vscode/blob/master/extensions/shellscript/package.json) 之后,我尝试将 shell/shell-script 更改为 shellscript。

【问题讨论】:

    标签: shell visual-studio-code file-association


    【解决方案1】:

    您在“文件”中缺少“s”:

    {
        "files.associations": {
            "PKGBUILD": "shellscript",
            "*.install": "shellscript",
            "*.desktop": "ini"
        }
    }
    

    修改设置后,您可以在链接的文件中使用任何别名https://github.com/Microsoft/vscode/blob/master/extensions/shellscript/package.json

    【讨论】:

      猜你喜欢
      • 2011-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多