630be49632
subrepo: subdir: "dotfiles/.vim/plugged/vim-go" merged: "22b2273cf" upstream: origin: "https://github.com/fatih/vim-go.git" branch: "master" commit: "22b2273cf" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
51 lines
1.2 KiB
Bash
Executable file
51 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Run a "bare" Vim with just vim-go and ignoring ~/.vim
|
|
#
|
|
|
|
set -euC
|
|
vimgodir=$(cd -P "$(dirname "$0")/.." > /dev/null && pwd)
|
|
cd "$vimgodir"
|
|
|
|
coverage=0
|
|
while getopts "c" option; do
|
|
case "$option" in
|
|
c) coverage=1; ;;
|
|
esac
|
|
done
|
|
shift $((OPTIND - 1))
|
|
|
|
if [ -z "${1:-}" ]; then
|
|
echo "unknown version: '${1:-}'"
|
|
echo "First argument must be 'vim-8.0', 'vim-8.2', or 'nvim'."
|
|
exit 1
|
|
fi
|
|
|
|
dir="/tmp/vim-go-test/$1-install"
|
|
export GOPATH=$dir
|
|
export GO111MODULE=on
|
|
export PATH="${GOPATH}/bin:$PATH"
|
|
shift
|
|
|
|
if [ ! -f "$dir/bin/vim" ]; then
|
|
echo "$dir/bin/vim doesn't exist; did you install it with the install-vim script?"
|
|
exit 1
|
|
fi
|
|
|
|
if [ $coverage -eq 1 ]; then
|
|
covimerage -q run --report-file /tmp/vim-go-test/cov-profile.txt --append \
|
|
$dir/bin/vim --noplugin -u NONE -i NONE -N -n \
|
|
+"set shm+=WAFI rtp^=$vimgodir packpath=$dir/share/vim/vimgo" \
|
|
+'filetype plugin indent on' \
|
|
+'packloadall!' \
|
|
"$@"
|
|
else
|
|
$dir/bin/vim --noplugin -u NONE -i NONE -N -n \
|
|
+"set shm+=WAFI rtp^=$vimgodir packpath=$dir/share/vim/vimgo" \
|
|
+'filetype plugin indent on' \
|
|
+'packloadall!' \
|
|
"$@"
|
|
fi
|
|
|
|
|
|
# vim:ts=2:sts=2:sw=2:et
|