From ad2fc463f0e2be0a105fdf3fad22136ceb54dc06 Mon Sep 17 00:00:00 2001 From: vCaesar Date: Mon, 2 Jan 2017 17:49:29 +0800 Subject: [PATCH] Update en vim --- en/01.4.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/en/01.4.md b/en/01.4.md index 1d21d0a0..5e799dcd 100644 --- a/en/01.4.md +++ b/en/01.4.md @@ -145,6 +145,60 @@ First, download the version of [Sublime](http://www.sublimetext.com/) suitable f Vim is a popular text editor for programmers, which evolved from its slimmer predecessor, Vi. It has functions for intelligent completion, compilation and jumping to errors. +vim-go is vim above an open-source go language using the most extensive development environment plug-ins + +The plugin address:[github.com/fatih/vim-go](https://github.com/fatih/vim-go) + +Vim plugin management are the mainstream [Pathogen](https://github.com/tpope/vim-pathogen) and [Vundle](https://github.com/VundleVim/Vundle.vim) +,But the aspects thereof are different. +Pathogen is to solve each plug-in after the installation of files scattered to multiple directories and poor management of the existence. Vundle is to solve the automatic search and download plug-ins exist. +These two plug-ins can be used simultaneously. + +1.Install Vundle + +```sh +mkdir ~/.vim/bundle +git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim +``` + +Edit .vimrc,Vundle the relevant configuration will be placed in the beginning([Refer to the Vundle documentation for details](https://github.com/VundleVim/Vundle.vim)) + +```sh +set nocompatible " be iMproved, required +filetype off " required + +" set the runtime path to include Vundle and initialize +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +" let Vundle manage Vundle, required +Plugin 'gmarik/Vundle.vim' + +" All of your Plugins must be added before the following line +call vundle#end() " required +filetype plugin indent on " required + +``` +2.Install Vim-go + +Edit ~/.vimrc,Add a line between vundle #begin and vundle #end: + +```sh + +Plugin 'fatih/vim-go' +``` + +Executed within Vim: PluginInstall + +3.Install YCM(Your Complete Me) to AutoComplete +Add a line to ~ / .vimrc: +```sh + +Plugin 'Valloric/YouCompleteMe' +``` +Executed within Vim: PluginInstall + + ![](images/1.4.vim.png?raw=true) Figure 1.8 Vim intelligent completion for Go