Install vim-go on linux?

I would best describe how dabbler at this point linux / vim. I'm trying to get started. Trying to install vim-go plugin and I have problems. Following the post .

I added the following to the end of my ~/.bashrc :

 export GOPATH=~/gocode export PATH=$PATH:$GOPATH/bin 

and created the following ~/gocode

So, I created my ~/.vim/bundle and ~/.vim/autoload . I downloaded pathogen.vim to the startup directory. I cloned the github repository for vim-go into the package directory that created the vim-go directory.

I created a ~ / .vimrc file and added the following:

 call pathogen#infect() syntax enable filetype plugin on set number let g:go_disable_autoinstall = 0 

I did the following from the vim console (which worked after installing Hg):

 :GoInstallBinaries 

FYI, I do not use vundle and, frankly, I don’t even know what it is :).

So far, the plugin does not seem to work. When I type :help vim-go , I get the following error: E149: Sorry, no help for vim-go

What am I doing

+5
source share
2 answers

Using the manual installation method (copying vim-go / to ~ / .vim), I was able to get it working, but only after I had the following ~ / .vimrc file, and, of course, Go files installed in accordance with instructions.

 set nocompatible set shell=/bin/sh syntax on filetype plugin on let g:go_disable_autoinstall = 0 

This was done on the Ubuntu 14.04 desktop without any other vim plugins or in the ~ / .vim or ~ / .vimrc directory. Honestly, the official installation instructions and many of the tutorials that are used there suggest that they will be useful in a new installation of Ubuntu.

However, "vim-go help" still didn't work for me. I tried the following command from the ~ / .vim directory and got this working: Vim helptag generation

+2
source

this put in you .vimrc:

 set nocompatible execute pathogen#infect() syntax on filetype on filetype plugin on filetype plugin indent on 

go to your .zshrc ou.bashrc and put:

 export GOPATH="$HOME/gocode/" export PATH=$PATH:~/gocode/bin 

and in the do terminal:

 source .zshrc 

or

 source .bashrc 

and now go to

  cd ~/.vim/bundle 

and do if you use a pathogen:

  git clone https://github.com/fatih/vim-go.git 

in vim do:

 :GoInstallBinaries 

check one of the following commands:

 :GoFmt :GoLint 
+2
source

Source: https://habr.com/ru/post/1204394/


All Articles