Skip to content

Commit bb4c77d

Browse files
committed
Mac OS Sublime setting
Even after setting $GOPATH, $GOBIN, $GOROOT, autocomplete can't work. Open Sublime from terminal directly.
1 parent ba86a96 commit bb4c77d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ebook/01.4.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@
149149

150150
如果没有出现这样的提示,一般就是你的`$PATH`没有配置正确。你可以打开终端,输入gocode,是不是能够正确运行,如果不行就说明`$PATH`没有配置正确。
151151

152+
4. MacOS下已经设置了$GOROOT, $GOPATH, $GOBIN,还是没有自动提示怎么办。
153+
154+
请在sublime中使用command + 9, 然后输入env检查$PATH, GOROOT, $GOPATH, $GOBIN等变量, 如果没有请采用下面的方法。
155+
156+
首先建立下面的连接, 然后从Terminal中直接启动sublime
157+
158+
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
159+
152160

153161
## Vim
154162
Vim是从vi发展出来的一个文本编辑器, 代码补全、编译及错误跳转等方便编程的功能特别丰富,在程序员中被广泛使用。

0 commit comments

Comments
 (0)