1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
Amir Salihefendic
2018-06-14 12:31:12 +02:00
parent 7288aee801
commit 3e3297af67
273 changed files with 11821 additions and 5377 deletions

View File

@ -0,0 +1,44 @@
#!/bin/sh
#
# Benchmark the syntax/go.vim file.
#
# The first argument is the Vim version to test (as in run-vim), the rest of the
# agument are g:go_highlight_* settings (without that prefix). You can use "ALL"
# to set all the options.
#
set -euC
vimgodir=$(cd -P "$(dirname "$0")/.." > /dev/null && pwd)
cd "$vimgodir"
if [ -z "${1:-}" ]; then
echo "unknown version: '${1:-}'"
echo "First argument must be 'vim-7.4', 'vim-8.0', or 'nvim'."
exit 1
fi
if [ -z "${2:-}" ]; then
echo "file not set"
echo "Second argument must be a Go file to benchmark, as 'filename:linenr'"
exit 1
fi
vim=$1
file="$(echo "$2" | cut -d : -f 1)"
line="$(echo "$2" | cut -d : -f 2)"
if [ -z "$line" -o "$line" = "$file" ]; then
echo "Second argument must be a Go file to benchmark, as 'filename:linenr'"
exit 1
fi
shift; shift
export RUNBENCH_SETTINGS=$@
export RUNBENCH_OUT="$(mktemp -p "${TMPDIR:-/tmp}" vimgo-bench.XXXXX)"
"$vimgodir/scripts/run-vim" $vim \
+"silent e $file" \
+"normal! ${line}G" \
-S ./scripts/runbench.vim
echo "Report written to:"
echo "$RUNBENCH_OUT"

View File

@ -25,7 +25,7 @@ case "$vim" in
# This follows the version in Arch Linux. Vim's master branch isn't always
# stable, and we don't want to have the build fail because Vim introduced a
# bug.
tag="v8.0.1176"
tag="v8.0.1542"
giturl="https://github.com/vim/vim"
;;

View File

@ -34,13 +34,13 @@ 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 -N \
+"set shm+=WAFI rtp=$dir/share/vim/vimgo packpath=$dir/share/vim/vimgo,$vimgodir" \
+"set shm+=WAFI rtp^=$vimgodir packpath=$dir/share/vim/vimgo" \
+'filetype plugin indent on' \
+'packloadall!' \
"$@"
else
$dir/bin/vim --noplugin -u NONE -N \
+"set shm+=WAFI rtp=$dir/share/vim/vimgo packpath=$dir/share/vim/vimgo,$vimgodir" \
+"set shm+=WAFI rtp^=$vimgodir packpath=$dir/share/vim/vimgo" \
+'filetype plugin indent on' \
+'packloadall!' \
"$@"

View File

@ -0,0 +1,26 @@
" vint: -ProhibitSetNoCompatible
set nocompatible nomore shellslash encoding=utf-8 shortmess+=WIF
lang mess C
if $RUNBENCH_SETTINGS is? 'all'
let $RUNBENCH_SETTINGS = join(['array_whitespace_error', 'build_constraints',
\ 'chan_whitespace_error', 'extra_types', 'fields', 'format_strings',
\ 'function_arguments', 'function_calls', 'functions', 'generate_tags',
\ 'operators', 'space_tab_error', 'string_spellcheck',
\ 'trailing_whitespace_error', 'types', 'variable_assignments',
\ 'variable_declarations'], ' ')
endif
for s:s in split($RUNBENCH_SETTINGS, ' ')
call execute('let g:go_highlight_' . s:s . ' = 1')
endfor
filetype plugin indent on
syntax on
syntime on
redraw!
let s:report = execute('syntime report')
execute ':e ' . fnameescape($RUNBENCH_OUT)
call setline('.', split(s:report, '\n'))
wq

View File

@ -14,6 +14,7 @@ let s:gopath = $GOPATH
if !exists('g:test_verbose')
let g:test_verbose = 0
endif
let g:go_echo_command_info = 0
" Source the passed test file.
source %