Go Syntax Highlighting and Other Text Editors and IDEs Extensions
The Go distribution already includes some syntax files and modes:
- go/misc/emacs/ - A Go Emacs mode.
- go/misc/vim/ - Go Vim syntax file. See this page for installation instructions, and other Go+Vim resources.
- go/misc/xcode/go.pbfilespec - Go source file spec for Xcode 3.
- go/misc/xcode/go.xclangspec - Go language specification for Xcode 3.
- go/misc/kate/go.xml - Go syntax highlighting file for KDE’s Kate text editor and other applications that use the KatePart component.
- go/misc/bbedit/Go.plist - Go syntax coloring and function navigation for BBEdit/TextWrangler.
If you have any other syntax files or modes for Go and want them included in this page, contact me.
- BBedit and TextWrangler, a syntax file is now also included in the standard Go distribution at
go/misc/bbedit/
. - Eclipse plugins.
- IntelliJ IDEA plugin.
- Gedit and other GtkSourceView based editors.
- Mcedit.
- Textmate.
- Textpad.
- JEdit.
- SciTE.
- Nano.
- Notepad++.
- Geany.
- SlickEdit.
- SublimeText 2.
- vim - Autocomplete, alternative syntax files and other extras.
Syntax Highlighting for Non-Editors
Go syntax highlighting for code listings in documents, web pages, etc.
- shBrushGo.js - A Go ‘brush’ for Alex Gorbatchev’s SyntaxHighlighter. By Allister Sanchez.
- lstlang0.sty - A LaTeX code listings highlighter. By Uriel Corfa.
See Also
- Acme and sam: the text editors used by some of the main Go developers. While designed by Rob Pike primarily for programming tasks, they don’t require any language-specific support, code is just text!
- In the dev utils page you can find ETag (exuberant-ctags) generation tools to use with any environment that can handle them.
IDEs
Go-specific IDEs, for plugins for existing IDEs like Eclipse and IntelliJ see above.