This is a creation in Article, where the information may have evolved or changed.
Go language Environment Build +sublime Text3 (under Windows) 1. Install Sublime Text3
2. Install the Go Language Package 3. Test if the Go language is installed successfully type the cmd command, open the DOS window, type the GO command (if it is not found under the default path, you can find it in the installation directory, Eg:go/bin) indicates that the installation was successful 4. Configure environment variables My Computer = "Properties = "System settings =" Environment variable settings, add Gopath variable, the path of this variable is the place to place the source code where there are two variables, these two variables are generally the default settings, GO, GOROOT5. To view the environment variable setting whether or not you typed Go env view command execution in DOS Successful prompt should interface 6. Configure Sublime Text3 (Install sublime plugin) 1). First install the Package Control Pack, CTRL + ' (menu item View > Show Console to bring up the Command interface), enter X Import urllib.request,os;pf= ' package control.sublime-package '; Ipp=sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); Open (Os.path.join ( IPP,PF), ' WB '). Write (Urllib.request.urlopen (' http://sublime.wbond.net/' +pf.replace (', '%20 '). read ()); restart Sublime Text32). Preferences=>package control (or shortcut key Ctrl+shift+p) Enter the package install enter and start installing sublime plug-in 3). Install the Gosublime plugin, Enter Gosublime 4 in the previous pop-up box. Install the Go build plugin, Ibid. 7. Test the go locale configuration to execute a Go language code, put the file into the src folder of Gopath, Ctrl+b pop up the Execute Command box (if it doesn't appear, set it manually, Tools=>build system=>gosumlime, this kind will be possible); Go run the current program and enter information Go build compiles the current program, outputs an. exe program Note: Two ways to see execution compile execution: 1. In sublime text 3 ctr+b Enter go run *.go file execution or go build *.go file, generate *.exe file, 2. or Open DOS window, run *.go file text 2 packa GE Control 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'
)
text3 package control 安装
import urllib.request,os; pf = 'Package Control.sublime-package' ; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open (os.path.join(ipp, pf), 'wb' ).write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace( ' ' , '%20' )).read()) |
1.安装sublime text3
2. Install the Go Language Package 3. Test if the Go language is installed successfully type the cmd command, open the DOS window, type the GO command (if it is not found under the default path, you can find it in the installation directory, Eg:go/bin) indicates that the installation was successful 4. Configure environment variables My Computer = "Properties = "System settings =" Environment variable settings, add Gopath variable, the path of this variable is the place to place the source code where there are two variables, these two variables are generally the default settings, GO, GOROOT5. To view the environment variable setting whether or not you typed Go env view command execution in DOS Successful prompt should interface 6. Configure Sublime Text3 (Install sublime plugin) 1). First install the Package Control Pack, CTRL + ' (menu item View > Show Console to bring up the Command interface), enter X Import urllib.request,os;pf= ' package control.sublime-package '; Ipp=sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); Open (Os.path.join ( IPP,PF), ' WB '). Write (Urllib.request.urlopen (' http://sublime.wbond.net/' +pf.replace (', '%20 '). read ()); restart Sublime Text32). Preferences=>package control (or shortcut key Ctrl+shift+p) Enter the package install enter and start installing sublime plug-in 3). Install the Gosublime plugin, Enter Gosublime 4 in the previous pop-up box. Install the Go build plugin, Ibid. 7. Test the go locale configuration to execute a Go language code, put the file into the src folder of Gopath, Ctrl+b pop up the Execute Command box (if it doesn't appear, set it manually, Tools=>build system=>gosumlime, this kind will be possible); Go run the current program and enter information Go build compiles the current program, outputs an. exe program Note: Two ways to see execution compile execution: 1. In sublime text 3 ctr+b Enter go run *.go file execution or go build *.go file, generate *.exe file, 2. or Open DOS window, run *.go file text 2 packa GE Control 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'
)
text3 package control 安装
import urllib.request,os; pf = 'Package Control.sublime-package' ; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open (os.path.join(ipp, pf), 'wb' ).write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace( ' ' , '%20' )).read()) |