Vim+go Environment Configuration

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

First step: Install Go

Download go:http://golanggo.com/archive

After decompression, execute the following command

TAR-ZVXF go1.4.1.linux-amd64.tar.gz

CD Go

CD src/

./all.bash



Seeing all TESTS PASSED proves the installation was successful.

CD ~

VI. BASHRC

Add export Path=/go after decompression/go/bin: $PATH Save

source. BASHRC

Execution Go See the following results:


Ok,go Tool Pack installation is complete.

Step Two: Install Vim

Download vim:http://vim.sourceforge.net/download.php

After decompression, perform the following actions:

./configure--prefix=/vim Installation Path/

Make

Make install

and add vim to path.

CD ~

VI. BASHRC

Add Export Path=/vim installation path/bin: $PATH Save

source. BASHRC


If you can see the vim version, it proves the installation was successful.

Step three: Install Ctags and TagList

Download path:http://sourceforge.net/projects/ctags/?source=typ_redirect

After decompression, perform the following actions:

./configure--prefix=/ctags Installation Path/

Make

Make install

Download taglist:http://www.vim.org/scripts/script.php?script_id=273

After unpacking, switch to the directory and copy the Taglist.vim below the share to ¥home/.vim/plugin.

Since vim itself does not take the text highlighting of go, do the following:


Note that there are several red directories, there is no Go.vim file, so you need to find the respective files under the corresponding Go.vim file and copied over.

No matter what other people do, anyway, I didn't find the Misc/vim folder in the Go directory, so I could only find another way. And then I found vim-go.

Download path: https://github.com/fatih/vim-go


You can see that there are just a few directories here, just to copy the Go.vim under the Red directory to the corresponding directory, the yellow-colored entire directory to the VIM installation directory can be copied. (Do not understand can refer to the following: HTTP://WWW.TUICOOL.COM/ARTICLES/NMQAMBQ)

The last step is to modify the configuration file:

A primary file when the. vimrc file is $home


Here are some of the things I added.

Finally, show the following:


Highlight OK.


Automatic completion, you need to download the following plugins

http://www.vim.org/scripts/script.php?script_id=1879

Copy the extracted files to the appropriate directory under ~/.vim/:

autoload/* - ~/.vim/autoload/

doc/* - ~/.vim/doc/

plugin/* - ~/.vim/plugin/

If there is no L9 library or will be error, L9 library download path: http://www.vim.org/scripts/script.php?script_id=1879

After decompression, install the above method to copy to the corresponding path, the effect is as follows:






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.