I would best be described as a dabbler at this point in linux/vim. I'm trying to get started with go. Trying to install the vim-go plugin and i'm having issues. Following the following post.
I added the following to the end of my ~/.bashrc
file:
export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin
and created the following directory ~/gocode
So i created my ~/.vim/bundle
& ~/.vim/autoload
directories. I downloaded pathogen.vim
to the autoload directory. I cloned the github repository for vim-go into the bundle directory which created a vim-go
directory.
I created my ~/.vimrc file and added the following:
call pathogen#infect()
syntax enable
filetype plugin on
set number
let g:go_disable_autoinstall = 0
I executed the following from the vim console (which worked after installing Hg):
:GoInstallBinaries
FYI, i don't use vundle and to be honest don't even know what it is :).
So far the plugin doesn't seem to be working. When i type :help vim-go
i get the following error: E149: Sorry, no help for vim-go
What am i do
VIM + Plugins = A Powerful IDE for Go Vim is a fast and lightweight text editor available by default with many Linux distributions and Unix-like operating systems. Vim is widely used to quickly edit text files and make configuration changes.
vim-go offers most of the features you may need when developing in Go, like syntax highlighting and folding, autocompletion support via gopls, code linting, quick execution using :GoRun , and more.
The plugin architecture of NeoVim is a lot better than Vim. Apart from plugin implementation in Vimscript (VimL), we can also use the Lua programming language. In addition, NeoVim has a lot more powerful plugins, which are not compatible with Vim.
Using the manual install method (copying vim-go/ to ~/.vim) I was able to get it working but only once I had the following ~/.vimrc file, and of course the Go binaries installed as per the instructions.
set nocompatible
set shell=/bin/sh
syntax on
filetype plugin on
let g:go_disable_autoinstall = 0
This was done on an Ubuntu 14.04 desktop with no other vim plugins or prior ~/.vim directory or ~/.vimrc. Frankly the official install instructions and many of the tutorials out there assume to much to be useful on a fresh install of Ubuntu.
However "help vim-go" was still not working for me. Tried the following command from within the ~/.vim directory and got that working: Vim helptag generation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With