美文网首页
手工安装GoSublime插件

手工安装GoSublime插件

作者: Luxin23 | 来源:发表于2019-04-22 22:11 被阅读0次

    找到你的包安装路径。


    package.png image.png

    gosublime的github地址是
    https://github.com/DisposaBoy/GoSublime

    直接git clone到这个包安装路径

    image.png

    切到GoSublime/src目录,新建margo目录
    我们需要把 GoSublime/src/margo.sh/extension-example/extension/extension-example.go。复制到刚刚新建的目录margo下。并改名为margo.go

    margo.go

    最后。修改GoSulime的配置,修改user配置

    image.png
    {
        "env":{
            "GOPATH":"D:/work/go",
            "GOROOT":"C:/Go"
        }
    }
    

    最后把默认配置
    // Whether or not gsfmt is enabled
    "fmt_enabled": false,

    改成"fmt_enabled": true, 这样就可以在保存的时候 go fmt代码了

    相关文章

      网友评论

          本文标题:手工安装GoSublime插件

          本文链接:https://www.haomeiwen.com/subject/cglpgqtx.html