-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall-neovim.sh
executable file
·107 lines (107 loc) · 3.5 KB
/
install-neovim.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
echo Installing Shadowsith/vim-plugin-collection
echo Firstly pull all submodules:
git submodule update --init --recursive
git submodule update --recursive
echo "Do you want to delete old neovim-files? [y/n]"
while [ \( "$ask" != "y" \) -o \( "$ask" != "n" \) -o \( "$ask" != "Y" \) -o \( "$ask" != "N" \) ]
do
read -r ask
if [ \( $ask == "y" \) -o \( $ask == "Y" \) ];
then
rm -f ~/.config/nvim/init.vim
rm -rf ~/.config/nvim/plugged
rm -rf ~/.config/nvim/bundle
rm -rf ~/.local/share/nvim/site/autoload/
mkdir -p ~/.config/nvim
mkdir -p ~/.local/share/nvim/site
echo The old neovim files have been deleted!
break
fi
if [ \( $ask == "n" \) -o \( $ask == "N" \) ];
then
echo Nothing has been deleted, installtion aborted!
exit 1
else
echo Input was not correct
echo "Do you want to delete old vim-files? [y/n]"
fi
done
echo Initialize vim-plug pluginmanager
cp ./vim-plug/plug.vim ./autoload/
cp -a ./autoload/ ~/.local/share/nvim/site/autoload/
echo Copy/Rename vim-plugin-collection to ~/.config/nvim/
cp -a ./bundle/* ~/.config/nvim/bundle
echo Copy .vimrc to .vimrc
cp ./.vimrc ~/.config/nvim/init.vim
echo Copy .tern-config to ~/.tern-config
cp ./.tern-config ~/.tern-config
echo "Do you want to install Java autocompletion? [y/n]"
while [ \( "$ask" != "y" \) -o \( "$ask" != "n" \) -o \( "$ask" != "Y" \) -o \( "$ask" != "N" \) ]
do
read -r ask
if [ \( $ask == "y" \) -o \( $ask == "Y" \) ];
then
./build/java_install.sh nvim
break
fi
if [ \( $ask == "n" \) -o \( $ask == "N" \) ];
then
break
else
echo Input was not correct
echo "Do you want to install Java autocompletion? [y/n]"
fi
done
echo "Do you want to install JavaScript autocompletion? [y/n]"
while [ \( "$ask" != "y" \) -o \( "$ask" != "n" \) -o \( "$ask" != "Y" \) -o \( "$ask" != "N" \) ]
do
read -r ask
if [ \( $ask == "y" \) -o \( $ask == "Y" \) ];
then
./build/javascript_tern_install.sh nvim
break
fi
if [ \( $ask == "n" \) -o \( $ask == "N" \) ];
then
break
else
echo Input was not correct
echo "Do you want to install JavaScript autocompletion? [y/n]"
fi
done
echo "Do you want to install C# autocompletion? [y/n]"
while [ \( "$ask" != "y" \) -o \( "$ask" != "n" \) -o \( "$ask" != "Y" \) -o \( "$ask" != "N" \) ]
do
read -r ask
if [ \( $ask == "y" \) -o \( $ask == "Y" \) ];
then
./build/omnisharp_install.sh nvim
break
fi
if [ \( $ask == "n" \) -o \( $ask == "N" \) ];
then
break
else
echo Input was not correct
echo "Do you want to install C# autocompletion? [y/n]"
fi
done
echo "Do you want to install Vim-Tagbar (shows a function bar at the left side)? [y/n]"
while [ \( "$ask" != "y" \) -o \( "$ask" != "n" \) -o \( "$ask" != "Y" \) -o \( "$ask" != "N" \) ]
do
read -r ask
if [ \( $ask == "y" \) -o \( $ask == "Y" \) ];
then
./build/tagbar_ctags_install.sh nvim
break
fi
if [ \( $ask == "n" \) -o \( $ask == "N" \) ];
then
break
else
echo Input was not correct
echo "Do you want to install Vim-Tagbar (shows a function bar at the left side)? [y/n]"
fi
done
echo Finished!
exit 0