Vim Installation Vim-go build Golang dedicated IDE

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

In two steps:

First step: Install the Vim plugin manager vundle

Step Two: Install the Vim-go plugin.

In addition: I have also written an automatic installation of the script. Lazy friend, you can download it by yourself: https://github.com/aimin/InstallvimGo.git

---------------------------------------------------------------------------------------

Begin:

First step: Install Vundle

According to Vundle installation instructions, first install the Vundle:

$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim

The. VIMRC is then configured to place the relevant configuration of the Vundle at the very beginning, and only the relevant configuration about Vundle is shown below:

Configure the. VIMRC to place the relevant configuration of the Vundle at the very beginning, and only the relevant configuration for Vundle is shown below (detailed reference Vundle readme.md):

  1. " -------------
  2. "Vundle
  3. "https://github.com/gmarik/vundle.vim
  4. " -------------
  5. Set nocompatible "be improved, required
  6. FileType off "required
  7. Set the runtime path to include Vundle and initialize
  8. Set Rtp+=~/.vim/bundle/vundle.vim
  9. Call Vundle#begin ()
  10. "Alternatively, pass a path where Vundle should install plugins
  11. "Call Vundle#begin (' ~/some/path/here ')
  12. "Let Vundle manage Vundle, required
  13. Plugin ' Gmarik/vundle.vim '
  14. "The following is examples of different formats supported.
  15. "Keep Plugin commands between vundle#begin/end.
  16. "Plugin on GitHub repo
  17. "" Plugin ' tpope/vim-fugitive '   
  18. "Plugin from http://vim-scripts.org/vim/scripts.html
  19. "" Plugin ' L9 '   
  20. "Git plugin not hosted on GitHub
  21. "" Plugin ' Git://git.wincent.com/command-t.git '   
  22. "Git repos on your local machine (i.e. if working on your own plugin)
  23. "" Plugin ' File:///home/gmarik/path/to/plugin '   
  24. The sparkup vim script is in a subdirectory of this repo called vim.
  25. "Pass the path to set the Runtimepath properly.
  26. "" Plugin ' Rstacruz/sparkup ' , {' RTP ': ' vim/'}
  27. "Avoid a name conflict with L9
  28. "" Plugin ' User/l9 ' , {' name ': ' newL9 '}
  29. "Install vim-go
  30. Plugin ' fatih/vim-go '
  31. "All of your Plugins must is added before the following line
  32. Call Vundle#end () "Required
  33. FileType plugin indent on "required
  34. "To ignore plugin indent changes, instead use:
  35. "FileType plugin on
  36. "
  37. "Brief Help
  38. ":P luginlist-lists configured Plugins
  39. ":P Lugininstall-installs plugins; Append '! ' to update or just:P luginupdate
  40. ":P luginsearch foo-searches for foo; Append '! ' to refresh local cache
  41. ":P luginclean-confirms removal of unused plugins; Append '! ' to auto-approve removal
  42. "
  43. "See:h Vundle for more details or wiki for FAQ
  44. "Put your non-plugin stuff after this line

Step Two: Install Vim-go (View Vim-go's readme.md in detail)

git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-goNote the path
在上述~/.vimrc里增加下面一行。
Plugin 'fatih/vim-go'

至此安装完成。
打开.go 文件看看效果吧!


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.