File tree 3 files changed +14
-2
lines changed
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ Just clone this repo into your bundles directory:
10
10
11
11
git clone https://github.com/rjohnsondev/vim-compiler-go.git ~/.vim/bundle/vim-compiler-go
12
12
13
+ Either ensure the $GOROOT environment variable is set, or otherwise set the
14
+ g: golang_goroot variable in .vimrc to where your go installation can be found.
15
+ This must be an absolute path:
16
+
17
+ let g:golang_goroot = "/home/richard/go"
18
+
13
19
### Manual installation
14
20
15
21
Drop golang.vim in ~ /.vim/compiler directory.
Original file line number Diff line number Diff line change
1
+ autocmd FileType go compiler golang
Original file line number Diff line number Diff line change 1
- autocmd FileType go compiler golang
2
- let g: golang_goroot = $GOROOT
1
+ if ! empty ($GOROOT ) && ! exists (' g:golang_goroot' )
2
+ let g: golang_goroot = $GOROOT
3
+ endif
4
+ if ! exists (' g:golang_goroot' )
5
+ let g: golang_goroot = ' /usr/bin'
6
+ echoerr ' Please set $GOROOT or g:golang_goroot'
7
+ endif
You can’t perform that action at this time.
0 commit comments