This is a creation in Article, where the information may have evolved or changed.
Golang
As a new programming language, there are a lot of Ides, which personally feel that the use IntelliJ
of development is a very good choice, but the free version has a feature is missing, if you do not want to pay to buy professional version, Atom
is a good choice.
Atom
is a more advanced text code Editor, is built by GitHub for the next generation of programming and development tool, Atom is open source, beautiful, all kinds of cool effect, there are a variety of powerful plug-ins.
Atom
The above configuration Golang
of the development environment, using the Atom
role of the IDE, found the effect is very good, the following records the steps of the configuration.
First install the atom, you can download the installation directly.
Installation Golang
, the above Mac installation can refer to: http://www.jianshu.com/p/358cbc939569
Go-plus Plug-in
go-plus
Is the Atom
above an open source Golang
development environment plug-in, project address:
Https://github.com/joefitzgerald/go-plus
He needs to rely on a few Golang
tools:
autocomplete-go
: Gocode Code Auto hint
gofmt
: Using Goftm,goimports,goturns
builder-go
: Go-install and Go-test, validating code, giving advice
gometalinet-linter
: Inspection of Goline,vet,gotype
navigator-godef
: Godef
tester-goo
: Go Test
gorename
: Rename Tools
Installing Go-plus
In Atom Preference
, you can find the Install menu and enter go-plus
:
Click: Install, will start the installation go-plus
, the go-plus
plug-in will automatically install the corresponding dependency plug-in, if not installed corresponding Golang
class library can use the go get
installation.
Shortcut key Settings
Everyone is familiar with the shortcut keys are not quite the same, Atom
and its plug-in for the shortcut keys is not my habit of shortcut keys, so need to modify the shortcut keys, open Preference
, select Keybindings
:
You can find the command of the shortcut you need to click on the left side copy按钮
, you can copy the corresponding keymap configuration, and then click your keymap file
to see keymap.cson
, Keymap.cson is their own Atom
shortcut key configuration file:
'atom-text-editor[data-grammar~="go"]:not([mini])': 'alt-r': 'golang:gorename'
You can modify the shortcut keys that you are familiar with:
'atom-text-editor[data-grammar~="go"]:not([mini])': 'cmd-r': 'golang:gorename'
Command line
go-plus
There is no compile tool available, you can run go程序,需要安装
atom-terminal-panel atom-terminal-panel ' installation directly on the command line ,在install中直接输入
.
Use shortcut keys directly control+ ' to Exhale terminal.
I personally used to fish shell
be used to the atom inside termianl
, so try to Terminal Plus
, for fish support is very good, shortcut key is cmd+shift+t
, you can directly exhale Terminal Plus
.