Step to setup on Ubuntu 12.04
Install Golang
$sudo apt-get install golang
Install gocode and dependency packages
$ sudo go get github.com/nsf/gocode
$ sudo go install github.com/nsf/gocode
$ sudo go get github.com/DisposaBoy/MarGo
$ sudo go install github.com/DisposaBoy/MarGo
add /usr/lib/go/bin to your $PATH by edit ~/.bashrc
export PATH=$PATH:/usr/lib/go/bin
Install Sublime Text 2 from http://http://www.sublimetext.com/2
$ tar vxjf Sublime Text 2 Build 2181 x64.tar.bz2
$ sudo mv Sublime\ Text\ 2 /opt/sublime2
$ sudo sudo ln -s /opt/sublime2/sublime_text /usr/bin/subl
Installation for Sublime Text 2 OK. Can run using symbol link "subl"
$ subl &
Install Package Control for Sublime Text 2.
press Ctrl + ` to view the python consol, paste following line
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'
Reset Sublime Text 2
Ctrl + Shift + P, then select "Package Control: Install Package", type "gosublime" and install
Reset Sublime Text 2, now you have a very nice go editor. Enjoy it.
Install gocode and dependency packages
$ sudo go get github.com/nsf/gocode
$ sudo go install github.com/nsf/gocode
$ sudo go get github.com/DisposaBoy/MarGo
$ sudo go install github.com/DisposaBoy/MarGo
add /usr/lib/go/bin to your $PATH by edit ~/.bashrc
export PATH=$PATH:/usr/lib/go/bin
Install Sublime Text 2 from http://http://www.sublimetext.com/2
$ tar vxjf Sublime Text 2 Build 2181 x64.tar.bz2
$ sudo mv Sublime\ Text\ 2 /opt/sublime2
$ sudo sudo ln -s /opt/sublime2/sublime_text /usr/bin/subl
Installation for Sublime Text 2 OK. Can run using symbol link "subl"
$ subl &
Install Package Control for Sublime Text 2.
press Ctrl + ` to view the python consol, paste following line
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'
Reset Sublime Text 2
Ctrl + Shift + P, then select "Package Control: Install Package", type "gosublime" and install
Reset Sublime Text 2, now you have a very nice go editor. Enjoy it.
1 comment:
how are the github repos linked to the sublime as i see a MarGo and gocode inside the packages also...
Post a Comment