On Saturday, November 17, 2018 at 11:16:08 AM UTC-7, rob wrote:
>
> Hi.  I'm interested in trying the internal compiling option for Go. 
>
> Vim 7.4.  Ubuntu 16.04 amd64 
>
> go 1.11.2 
>
> I'm using the version of vim that gets installed by apt. 
>
> When I type :make from a window showing a buffer containing Go code, I 
> get this error: 
>
> /bin/bash: go: command not found 
>
> .vimrc 
>
> set ignorecase laststatus=2 mouse=a clipboard=unnamed wrapmargin=10 
> autowrite hlsearch incsearch 
> set statusline=%02n:%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P 
> set nocompatible 
> filetype plugin on 
> set path+=,~/Documents, 
>
> Yet, I have no trouble compiling from a command prompt as the go binary 
> is in my path. 
>
> I suspect that this would be fixed by me symlinking the go binary 
> somewhere, but I don't know where. 
>
> Thanks for any help. 
>
> --rob solomon 
>

Hi Rob,

I use vim, and the :make command works fine for me.

How are you running vim?  Is it from the same shell process that you are 
running go build or go run from?  In other words,

$ go version
> go version go1.11.2 linux/amd64      [shows that the go command was found]
> $ vim main.go


Or are you running vim from another shell or GUI? Either way, you need to 
have your PATH environment variable set properly in vim's parent's process. 
That is, the shell from which you start vim.


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to