Configuring the Golang development environment with Atom

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

GolangAs 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.
Atomis 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.
AtomThe 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-plusIs 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-plusThere 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 .

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.