GoLang with Sublime on Windows
Posted | archive
好吧。还在力战渣windows。非管理员权限。下载zip包解压到 D:\dev\go
sublime处理中文路径一直很bug。需要修改 /Data/Packages/Default/exec.py:45 行:
for k, v in proc_env.iteritems():
nv = os.path.expandvars(v)
if isinstance(v, unicode):
import locale
nv = nv.encode(locale.getdefaultlocale()[1])
proc_env[k] = nv
然后菜单 Tools -> Build System -> New...
{
"cmd": ["go", "run", "$file"],
"path": "D:/dev/go/bin",
"file_regex": "^(.+):([0-9]+):.*",
"env": {"GOROOT": "D:/dev/go"}
}
这就是Go的配置咯。然后就Ctrl+B了。
Comments