vim-plug/test/run
Junegunn Choi 61b77bc8e8 Fix many subtle issues regarding on-demand loading etc.
- On-demand loading
    - Fix loading of unwanted files (e.g. colors/*.vim, syntax/*.vim, etc.)
- Filetyp-based on-demand loading
    - Load `after/ftdetect` as well
    - Make sure indent files are loaded by invoking
      `doautocmd filetypeindent FileType`
- Ensure plugin loaded when it was added after Vim started
- Do not reload $MYVIMRC after installtion/update
    - Instead simply call plug#end()
2014-07-31 16:34:41 +09:00

46 lines
958 B
Bash
Executable File

#!/bin/bash
cd $(dirname $BASH_SOURCE)
cd ..
PLUG_SRC=$(pwd)/plug.vim
cd - > /dev/null
if [ ! -d vader.vim ]; then
git clone https://github.com/junegunn/vader.vim.git
fi
rm -rf fzf
if [ ! -d fzf-staged ]; then
git clone https://github.com/junegunn/fzf.git fzf-staged
fi
make_dirs() {
mkdir -p "$1"
cd "$1"
mkdir -p autoload colors ftdetect ftplugin indent plugin syntax
for d in *; do
cat > $d/xxx.vim << EOF
" echom expand('<sfile>')
let g:xxx = get(g:, 'xxx', [])
call add(g:xxx, '${1:4}/$d')
EOF
done
cd - > /dev/null
}
make_dirs xxx/
make_dirs xxx/after
cat > /tmp/mini-vimrc << VIMRC
set rtp+=vader.vim
source $PLUG_SRC
VIMRC
if [ "$1" = '!' ]; then
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader! workflow.vader' > /dev/null &&
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'let g:plug_threads = 1 | Vader! workflow.vader' > /dev/null
else
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader workflow.vader'
fi