Go 1 was released in March 2012 and has gained some popularity since then. Naturally developers are looking for proper IDEs to support code completion, syntax highlighting and other editing features.
Comparison of IDEs
Sublime Text 2
Sublime Text 2 is a relatively new editor and has gained popularity among developers (probably because of the similarity to TextMate). It is not a fully fledged IDE but is easily extensible with Python scripts. There is already a huge number of plugins for programming languages available and one of those plugins is GoSublime. GoSublime offers syntax highlighting for Go, code completion and a lot more features that transform Sublime Text 2 into a very usable IDE for Go.
Sublime Text 2 can be downloaded from the link below and is free for evaluation. The evaluation license has no time limit and all features of the full version are available.
IntelliJ IDEA is an IDE by Jetbrains and very popular among Java developers. The Go plugin comes with syntax highlighting, code completion, automatic builds and sublibrary support. This makes it easy to split your project into several packages while still browsing them in a single IDE project.
A very nice feature is that the plugin uses the systax highlighting to show you unused variables or packages (as seen in the image below - the
hdea variable is currently unused).
Right now LiteIDE is the only IDE that has directly targeted Go. Among other things it supports projects, code completion, syntax highlighting, debuggin, an automatic build system and a package browser.
The debugger uses gdb in the background and allows you to inspect variables and the call stack.
Intype is an Windows only text editor. It has limited support for syntax highlighting and there exists a bundle for Go that adds Go specific highlighting.
Netbeans has a built-in support for a variety of languages and with the Go plugin it supports creating Go files in your regular projects. Apart from syntax highlighting this plugin does not provide any other Go specific features. It is not clear how adding Go files to Java projects is useful or how those files can be compiled using the IDE.
Eclipse is probably the most popular IDE listed here. The GoClipse plugin adds IDE functionality to Eclipse to support Go. GoClipse comes with configurable syntax highlighting, autocompletion with documentation, automatic builds and most importantly experimental debug support.
TextMate is a Mac OS only text editor. According to the description of the available bundle, it can be extended to highlight Go code and provide source code snippets.
Komodo Edit (or Komodo IDE) is an open source code editor from ActiveState. The editor is crossplatform and based on Mozilla 7.0. It has support for a variety of languages but comes with limited functionality when using the free Komodo Edit version. Together with the komodo-go plugin it provides basic syntax highlighting and code completion with Gocode.
Zeus is an Windows-only editor that directly ships with support for Go. It uses CTAGS for code completion, but can be configured to use gocode. Zeus supports code folding, smart indentation, code navigation and debugging using gdb.
The following two tables summarize the features of the IDEs discussed above. This table shows how the plugins or bundles are licensed and on which platforms they will work.
|IDE||License||Windows||Linux||Mac OS X||Other Platforms|
|SublimeText 2||Proprietary software||Yes||Yes||Yes||-|
|Intype||New BSD Licence||Yes||No||No|
|Eclipse||Eclipse Public License 1.0||Yes||Yes||Yes||JVM|
The following table shows a selection of features that are available in the different IDEs.
|IDE||Debugger||Syntax Highlighting||Code Completion|
Right now, both the Eclipse and IntelliJ plugins are very mature and have a rich set of features for developing applications in Go. More lightweight alternatives such as Sublime Text 2, TextMate and LiteIDE come with a good support for syntax highlighting, predefined snippets, code completion and automatic formatting (using gofmt). Netbeans, together with Intype are very limited in that they only provide syntax highlighting.
Alternatives such as vim and emacs are not discussed in this article as the focus lies on graphical editors. If you don't like the the solutions in this article and prefer to work with text-based editors I encourage you to have a look at the Go integration for vim and emacs.
Update: The article was updated after users on Reddit suggested Zeus and Komodo Edit for Google Go.