Vim+go Configuration

Source: Internet
Author: User
Tags gocode
This is a creation in Article, where the information may have evolved or changed. after you have installed go, you need to set the following environment variables:
    • goroot:go installation directory
    • gopath: A directory for the Go language package that cannot be
    • gobin:go binary file directory, written%goroot%\bin is good
1, install Gocode, set automatic completion code. go get-u-ldflags-h=windowsgui github.com/nsf/gocode, if successful, Gobin directory will have gocode.exe files, Gopath will have src\github.com\nsf\ Gocode directory. The _VIMRC file in the Vim installation directory is added filetype plugin indent on
Syntax on at this point the CTRL+P key combination can be called to complete the code hint. 2, set Golang syntax highlighting. & nbsp Download Go1.3beat2 Source (after the misc in the Vim directory), will download the directory of go/misc/vim/in the corresponding syntax, Ftplugin, indent,   compiler go.vim files copied to/usr/ share/vim/vim74/the corresponding directory, the Ftdetect folder includes files copied to Vim74.
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.