2014-02-11 10:09:24 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd $(dirname $BASH_SOURCE)
|
|
|
|
cd ..
|
|
|
|
PLUG_SRC=$(pwd)/plug.vim
|
|
|
|
cd - > /dev/null
|
|
|
|
|
2014-06-22 20:47:13 -07:00
|
|
|
if [ ! -d vader.vim ]; then
|
|
|
|
git clone https://github.com/junegunn/vader.vim.git
|
|
|
|
fi
|
2014-02-11 10:09:24 -07:00
|
|
|
|
2014-07-16 03:52:58 -07:00
|
|
|
rm -rf fzf
|
|
|
|
if [ ! -d fzf-staged ]; then
|
|
|
|
git clone https://github.com/junegunn/fzf.git fzf-staged
|
|
|
|
fi
|
|
|
|
|
2014-07-31 00:34:41 -07:00
|
|
|
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
|
|
|
|
|
2014-06-22 20:47:13 -07:00
|
|
|
cat > /tmp/mini-vimrc << VIMRC
|
|
|
|
set rtp+=vader.vim
|
2014-02-11 10:09:24 -07:00
|
|
|
source $PLUG_SRC
|
2014-06-22 20:47:13 -07:00
|
|
|
VIMRC
|
|
|
|
|
|
|
|
if [ "$1" = '!' ]; then
|
2014-07-16 03:52:58 -07:00
|
|
|
/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
|
2014-06-22 20:47:13 -07:00
|
|
|
else
|
|
|
|
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader workflow.vader'
|
|
|
|
fi
|
2014-02-11 10:09:24 -07:00
|
|
|
|