fixed indentaions again= =||
This commit is contained in:
76
1.4.md
76
1.4.md
@@ -34,7 +34,7 @@
|
||||
|
||||
1. 打开之后安装 Package Control:Ctrl+` 打开命令行,执行如下代码:
|
||||
|
||||
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
|
||||
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
|
||||
|
||||
这个时候重启一下Sublime,可以发现在在菜单栏多了一个如下的栏目,说明Package Control已经安装成功了。
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
2. 接下来安装gocode和MarGo。
|
||||
打开终端运行如下代码(需要git)
|
||||
|
||||
go get -u github.com/nsf/gocode
|
||||
go get -u github.com/DisposaBoy/MarGo
|
||||
go get -u github.com/nsf/gocode
|
||||
go get -u github.com/DisposaBoy/MarGo
|
||||
|
||||
这个时候我们会发现在`$GOPATH/bin`下面多了两个可执行文件,gocode和MarGo,这两个文件会在GoSublime加载时自动启动。
|
||||
|
||||
@@ -70,30 +70,30 @@ Vim是从vi发展出来的一个文本编辑器, 代码补全、编译及错误
|
||||
|
||||
1. 配置vim高亮显示
|
||||
|
||||
cp -r $GOROOT/misc/vim/* ~/.vim/
|
||||
cp -r $GOROOT/misc/vim/* ~/.vim/
|
||||
|
||||
2. 在~/.vimrc文件中增加语法高亮显示
|
||||
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
|
||||
3. 安装[Gocode](https://github.com/nsf/gocode/)
|
||||
|
||||
go get -u github.com/nsf/gocode
|
||||
go get -u github.com/nsf/gocode
|
||||
|
||||
gocode默认安装到`$GOPATH/bin`下面,需要把`$GOPATH/bin`路径设置到系统`$PATH`里面。
|
||||
|
||||
4. 配置[Gocode](https://github.com/nsf/gocode/)
|
||||
|
||||
~ cd $GOPATH/src/github.com/nsf/gocode/vim
|
||||
~ ./update.bash
|
||||
~ gocode set propose-builtins true
|
||||
propose-builtins true
|
||||
~ gocode set lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
~ gocode set
|
||||
propose-builtins true
|
||||
lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
~ cd $GOPATH/src/github.com/nsf/gocode/vim
|
||||
~ ./update.bash
|
||||
~ gocode set propose-builtins true
|
||||
propose-builtins true
|
||||
~ gocode set lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
~ gocode set
|
||||
propose-builtins true
|
||||
lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
|
||||
>gocode set里面的两个参数的含意说明:
|
||||
>
|
||||
@@ -113,26 +113,26 @@ Emacs传说中的神器,她不仅仅是一个编辑器,它是一个整合环
|
||||
|
||||
1. 配置Emacs高亮显示
|
||||
|
||||
cp $GOROOT/misc/emacs/* ~/.emacs.d/
|
||||
cp $GOROOT/misc/emacs/* ~/.emacs.d/
|
||||
|
||||
2. 安装[Gocode](https://github.com/nsf/gocode/)
|
||||
|
||||
go get -u github.com/nsf/gocode
|
||||
go get -u github.com/nsf/gocode
|
||||
|
||||
gocode默认安装到`$GOPATH/bin`里面下面,需要把`$GOPATH/bin`路径设置到系统`$PATH`里面。
|
||||
|
||||
3. 配置[Gocode](https://github.com/nsf/gocode/)
|
||||
|
||||
|
||||
~ cd $GOPATH/src/github.com/nsf/gocode/emacs
|
||||
~ cp go-autocomplete.el ~/.emacs.d/
|
||||
~ gocode set propose-builtins true
|
||||
propose-builtins true
|
||||
~ gocode set lib-path "/home/border/gocode/pkg/linux_amd64" // 换为你自己的路径
|
||||
lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
~ gocode set
|
||||
propose-builtins true
|
||||
lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
~ cd $GOPATH/src/github.com/nsf/gocode/emacs
|
||||
~ cp go-autocomplete.el ~/.emacs.d/
|
||||
~ gocode set propose-builtins true
|
||||
propose-builtins true
|
||||
~ gocode set lib-path "/home/border/gocode/pkg/linux_amd64" // 换为你自己的路径
|
||||
lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
~ gocode set
|
||||
propose-builtins true
|
||||
lib-path "/home/border/gocode/pkg/linux_amd64"
|
||||
|
||||
4. 需要安装 [Auto Completion](http://www.emacswiki.org/emacs/AutoComplete)
|
||||
|
||||
@@ -142,13 +142,13 @@ Emacs传说中的神器,她不仅仅是一个编辑器,它是一个整合环
|
||||
|
||||
配置~/.emacs文件
|
||||
|
||||
;;auto-complete
|
||||
(require 'auto-complete-config)
|
||||
(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete/ac-dict")
|
||||
(ac-config-default)
|
||||
(local-set-key (kbd "M-/") 'semantic-complete-analyze-inline)
|
||||
(local-set-key "." 'semantic-complete-self-insert)
|
||||
(local-set-key ">" 'semantic-complete-self-insert)
|
||||
;;auto-complete
|
||||
(require 'auto-complete-config)
|
||||
(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete/ac-dict")
|
||||
(ac-config-default)
|
||||
(local-set-key (kbd "M-/") 'semantic-complete-analyze-inline)
|
||||
(local-set-key "." 'semantic-complete-self-insert)
|
||||
(local-set-key ">" 'semantic-complete-self-insert)
|
||||
|
||||
详细信息参考: http://www.emacswiki.org/emacs/AutoComplete
|
||||
|
||||
@@ -250,19 +250,19 @@ Eclipse也是非常常用的开发利器,以下介绍如何使用Eclipse来编
|
||||
|
||||
2.下载[goeclipse](https://code.google.com/p/goclipse/)插件
|
||||
|
||||
http://code.google.com/p/goclipse/wiki/InstallationInstructions
|
||||
http://code.google.com/p/goclipse/wiki/InstallationInstructions
|
||||
|
||||
3.下载gocode,用于go的代码补全提示
|
||||
|
||||
gocode的github地址:
|
||||
|
||||
https://github.com/nsf/gocode
|
||||
https://github.com/nsf/gocode
|
||||
|
||||
在windows下要安装git,通常用[msysgit](https://code.google.com/p/msysgit/)
|
||||
|
||||
再在cmd下安装:
|
||||
|
||||
go get -u github.com/nsf/gocode
|
||||
go get -u github.com/nsf/gocode
|
||||
|
||||
也可以下载代码,直接用go build来编译,会生成gocode.exe
|
||||
|
||||
@@ -270,7 +270,7 @@ gocode的github地址:
|
||||
|
||||
5.配置插件
|
||||
|
||||
Windows->Reference->Go
|
||||
Windows->Reference->Go
|
||||
|
||||
(1).配置Go的编译器
|
||||
|
||||
|
||||
Reference in New Issue
Block a user