Vim settings Golang syntax highlighting (Centos)

Source: Internet
Author: User

The go language comes with a syntax highlighting file with Vim.
Http://www.golangtc.com/download Download go1.3.3.src.tar.gzgo1.3.3 (source only), unzip move to/usr/local/
1: Turn on VIM syntax highlighting

Vim ~/.VIMRC
Syntax on
Set FENCS=UTF-8,GBK


2: Copy the files in the/usr/local/go/misc/vim/directory to the ~/.vim/directory (if no new directory is available)


mkdir ~/.vim
Cp-r/usr/local/go/misc/vim/* ~/.vim/


3: New ~/.vim/ftdetect/go.vim, add the following content: Au bufread,bufnewfile *.go set Filetype=go
or the command line:
echo "Au bufread,bufnewfile *.go set filetype=go" > ~/.vim/ftdetect/go.vim


3 Steps to open the vim go keyword highlight rhythm

Vim settings Golang syntax highlighting (Centos)

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.