aboutsummaryrefslogtreecommitdiff
path: root/install.sh
blob: cfdf3bd18c533bdd330d8724dbe65274688ee2dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Welcome to Vimax!
#
# This script allows a local installation to some random path and starts
# the vim-EDITOR after installation is finished. That way the configuration
# can easily be tested.
#
# You have just executed this script

if [[ ! $EDITOR =~ ^n?g?vim?$ ]]; then
    echo Your EDITOR environment variable is set to \"$EDITOR\"
    echo This script requires it to be some kind of vim or nvim, gvim, vi, ...
    echo
    echo Please run this script with EDITOR=vim sh install.sh
    echo Which will set the EDITOR just temporary for running this script.
    exit
fi

cd $(dirname "$0")

echo "working in $(pwd)"

mkdir -p autoload
ln -i -s -b vimrc-full vimrc

$EDITOR -u NORC -N \
 +runtime plugin/netrwPlugin.vim \
 +'new +saveas!\ autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' \
 +'new +saveas!\ vimrc-full http://git.entwicklerseite.de/vim/plain/vimrc-full' \
 +qall

$EDITOR -u vimrc-full -N \
 +'PlugInstall --sync' \
 +qall

$EDITOR -u vimrc-full -N $0
..