This is a creation in Article, where the information may have evolved or changed.
I am in the previous post ( http://www.cnblogs.com/MikeZhang/archive/2012/02/09/windowsGo.html describes how to install the Go language under Windows, and today I'll show you how to configure the Go language development environment with notepad++.
First, the preparatory work:
1, install the Go language;
2, add the Go/bin directory to the environment variable;
3, installation notepad++;
Second, configuration notepad++ support Go language syntax highlighting
1, download notepad++ 's Go Language support package (http://notepad-plus.sourceforge.net/commun/userDefinedLang/go.zip);
2, the file Userdefinelang_go.xml content copy to application data under the notepad++ directory userdefinelang.xml;
xp:c:\documents and Settings\[username]\application data\notepad++
vista/win7:c:\users\[username]\appdata\roaming\notepad++
3. Copy the Go.xml file to the Plugins\apis directory under the notepad++ installation directory (for example: D:\Program files\notepad++\plugins\apis);
4, restart notepad++;
Third, set the Go language compilation run shortcut keys
here is a demonstration of the following code:
file name: Test1.go
Package Mainimport "FMT" Func Main () { fmt. Println ("Test")}
Principle:
compilation: 8g-o test1.8 test1.go
Link: 8l-o test1.exe test1.8
Run: Test1.exe
Compile link run: 8g-o test1.8 test1.go & 8l-o test1.exe test1.8 & Test1.exe
Specific implementation:
1, open the Test1.go file with notepad++;
2. Press F5 to enter the following in the popup dialog box:
cmd/k 8g.exe-o tmp.8 "$ (Full_current_path)" & 8l.exe-o tmp.exe tmp.8 & del tmp.8 & Tmp.exe & PAUSE & del Tmp.exe & EXIT
Save As "Run Go" and set Ctrl+f6 as the shortcut key;
3, according to CTRL+F6 running procedures;
Well, that's all, I hope it helps.