开发工具|sublime
sublime
开发工具-sublime
下面由sublime教学栏目给大家分享sublime text3解决Gosublime无法自动补全代码的方法,希望对需要的朋友有所帮助!
c 窗口 源码,vscode官网无法下载,ubuntu svn 服务,tomcat如何访问网页,爬虫不出数据,php和c通信,栾川seo优化哪家实力强,淘宝券 网站源代码,织梦模板一键同步lzw
cps源码,ubuntu 显示启动文字,查看tomcat版本报错,api 爬虫 Java,双柚科技php,正规的杭州抖音seo优化多少钱lzw
sublime text3解决Gosublime无法自动补全代码
通用oa系统源码,ubuntu多点触摸hid,论坛爬虫软件下载,PHP培训中山,shopify seo弊端lzw
版本
Sublime Text3.2.1go version go1.12.1 darwin/amd64Gosublime 18.11.28
安装Gosublime
打开Perferences–Browse Packages…,进入Gosublime,在命令行里输入:
git clone /DisposaBoy/GoSublime.git
自动补全解决方法
在windows和mac上使用sublime text3安装Gosublime插件后都无法自动补全代码,经过多日的研究找到如下解决方法。
打开Perferences–Browse Packages…,进入Gosublime:
1、在src目录下创建margo目录;
2、拷贝src/margo.sh/extension-example/extension-example.go文件到margo目录下;
3、拷贝margo文件夹(所有文件和目录)到src/margo.sh/vendor目录下;
4、重新打开sublime text3,稍等几分钟就可以自动补全代码了。
Gosublime配置
Perferences–Package Settings–Gosublime–Settings - User{ "env": { "GOPATH": "/data", "GOROOT": "/usr/local/go", "PATH": "$GOROOT:$GOPATH:$GOROOT/bin", }, "gscomplete_enabled": true, "fmt_enabled": true, "fmt_tab_indent": false, "fmt_tab_width": 4, "autocomplete_snippets": true, "autocomplete_tests": true, "autocomplete_builtins": true, "autocomplete_closures": true, "autocomplete_suggest_imports": true, "calltips": true, "use_named_imports": true, "autoinst": true, "ipc_timeout": 1, "fmt_cmd": ["goimports"], "on_save": [ {"cmd": "gs_comp_lint"}, {"cmd": "goimports"} ], "lint_enabled": true, "linters": [ {"cmd": ["go", "run"]} ], "comp_lint_enabled": true, "comp_lint_commands": [ {"cmd": ["go", "install"]} ],}
ctrl+q显示帮助
Perferences–Package Settings–Gosublime–Key Bindings - Default{"keys": ["ctrl+q"],// "keys": ["super+.", "super+h"],"command": "gs_doc","args": {"mode": "hint"},"context": [{ "key": "selector", "operator": "equal", "operand": "source.go" }]},