美文网首页收藏小屋
sublime安装golang插件

sublime安装golang插件

作者: alphayan | 来源:发表于2017-10-27 14:57 被阅读1194次

在package control(快捷键ctrl+shift+p)里面输入gosublime

Paste_Image.png

在Preferences(首选项N) -> package settings() -> GoSublime -> Settings - Uesrs配置GOROOT,GOPATH

Paste_Image.png

输入json格式的配置:

{
    "env": {
        "GOROOT": "C:/Go",
        "GOPATH": "D:/gopath"
    }
}

Ctrl+B自动运行go

Tools(工具)->Build System(编译系统)->Gosublime

Paste_Image.png

写个hello world验证一下

新建一个main.go文件,要不然不会自动提示

Paste_Image.png

相关文章

网友评论

    本文标题:sublime安装golang插件

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