sublime text configuration golang development environment

First, the preparatory work:

   1. Go download language packs:  https://code.google.com/p/go/downloads/list

   2, download Git:  https://code.google.com/p/msysgit/downloads/list

   3, 2 download Sublime: http://www.sublimetext.com/2

Second, the installation:

  1, the installation go (all the way to next), he will automatically help you configure the environment variables

  2, installation sublime (all the way to next)

  3, install git (all the way to next)

Third, the configuration:

  1, the installation  Package Penalty for Control , after opening Sublime Text 2, press the shortcut keys  Ctrl + ` , open a command line window,` This button above the Tab key, and I just started not found, huh, huh. Enter the following and press Enter:

  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'

   After the restart Sublime Text 2, it can be found in the Preferences menu, more of a menu item Package Control.

  2. Install gocode , open cmd, enter the following:

    go get github.com/nsf/gocode

    go install github.com/nsf/gocode

  After installation is complete, we can at go / bin directory, find more of a gocode file.

  3. Install GoSublime plugin:

  Open later Sublime Text 2, found in the Preferences menu Package Control, click Open, there will be a Package Control interface, enter the Install Package, wait for some time, there will be another interface, this time, the input GoSublime , click on the item appeared, it you can be successfully installed GoSublime up.

  4. Modify GoSublime configuration: In the Preferences menu, find the Package Settings, then find GoSublime, to find down Settings - Default. Then open the file, add the following configuration and save:

     "env": {"path":"c:/go/bin;" },

Reproduced in: https: //www.cnblogs.com/zhengJason/p/3581207.html

Guess you like

Origin blog.csdn.net/weixin_33968104/article/details/93462265