-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvim_setup.sh
More file actions
151 lines (113 loc) · 4.62 KB
/
vim_setup.sh
File metadata and controls
151 lines (113 loc) · 4.62 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/bin/bash
echo "Starting command: $0"
if [ "$#" -ne 2 ] || [ ! -d "$1" ]; then
echo "Error: $0 [home folder path] [username]";
echo "Exiting command: $0"
else
##Uncomment if not done in vagrantfile
##apt-get update
home_folder=$1
#Add / at the end if not present
[[ $home_folder != *\/ ]] && home_folder+="/"
username=$2
apt-get remove -y --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common vim-nox-py2
apt-get install -y liblua5.1-dev luajit libluajit-5.1 python-dev python3-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#So vim can be uninstalled again via `dpkg -r vim`
apt-get install -y checkinstall
rm -rf /usr/local/share/vim /usr/bin/vim
sleep 5
cd $home_folder
git clone https://github.com/vim/vim
cd $home_folder"vim"
git pull && git fetch
#In case Vim was already installed
cd src
make distclean
cd ..
./configure \
--enable-multibyte \
--enable-perlinterp=dynamic \
--enable-rubyinterp=dynamic \
--with-ruby-command=/usr/bin/ruby \
--enable-pythoninterp=dynamic \
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
--enable-python3interp \
--with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu \
--enable-luainterp \
--with-luajit \
--enable-cscope \
--enable-gui=auto \
--with-features=huge \
--with-x \
--enable-fontset \
--enable-largefile \
--disable-netbeans \
--with-compiledby="medulli" \
--enable-fail-if-missing
make && make install
sleep 10
##Pathogen
mkdir -p $home_folder".vim/autoload" $home_folder".vim/bundle" && \
curl -LSso $home_folder".vim/autoload/pathogen.vim" https://tpo.pe/pathogen.vim
##Omnisharp
apt-get install -y mono-complete
cd $home_folder".vim/bundle" && \
git clone https://github.com/OmniSharp/omnisharp-vim.git
cd omnisharp-vim
git submodule update --init --recursive
cd server
export NoCompilerStandardLib=false
xbuild
##YouCompleteMe
git clone https://github.com/valloric/YouCompleteMe.git $home_folder".vim/bundle/YouCompleteMe"
cd $home_folder".vim/bundle/YouCompleteMe"
##Git might be a dick and fail here. Re-update until no error
git submodule update --init --recursive
python3 install.py --clang-completer --omnisharp-completer
sleep 5
#Custom file handled with dotfiles
#cp $home_folder".vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py" $home_folder".ycm_extra_conf.py"
##Dispatch (for omnisharp)
git clone git://github.com/tpope/vim-dispatch.git $home_folder".vim/bundle/dispatch"
##Syntastic
git clone --depth=1 https://github.com/scrooloose/syntastic.git $home_folder".vim/bundle/synthastic"
##CtrlP
git clone https://github.com/ctrlpvim/ctrlp.vim.git $home_folder".vim/bundle/ctrlp"
##vim-csharp
git clone git://github.com/OrangeT/vim-csharp.git $home_folder".vim/bundle/csharp"
##tmuxline
##git clone https://github.com/edkolev/tmuxline.vim $home_folder".vim/bundle/tmuxline"
##a (.c <-> .h)
##git clone https://github.com/vim-scripts/a.vim $home_folder".vim/bundle/a"
##nerdcommenter
git clone https://github.com/scrooloose/nerdcommenter.git $home_folder".vim/bundle/nerdcommenter"
##nerdtree
git clone https://github.com/scrooloose/nerdtree.git $home_folder".vim/bundle/nerdtree"
##easymotion
git clone https://github.com/easymotion/vim-easymotion $home_folder".vim/bundle/easymotion"
##ack - ack in searches
#_git clone https://github.com/mileszs/ack.vim.git $home_folder".vim/bundle/ack"
##airline
git clone https://github.com/vim-airline/vim-airline $home_folder".vim/bundle/airline"
##vim -u NONE -c ":helptags $home_folder'.vim/bundle/vim-airline/doc'" -c q
##gitgutter
git clone git://github.com/airblade/vim-gitgutter.git $home_folder".vim/bundle/gitgutter"
##fugitive
git clone git://github.com/tpope/vim-fugitive.git $home_folder".vim/bundle/fugitive"
##vim -u NONE -c "helptags $home_folder'.vim/bundle/vim-fugitive/doc'" -c q
##colors-solarized
##git clone git://github.com/altercation/vim-colors-solarized.git $home_folder".vim/bundle/colors-solarized"
##colors-gruvbox
git clone https://github.com/morhetz/gruvbox.git $home_folder".vim/bundle/gruvbox"
##tabline
git clone git://github.com/mkitt/tabline.vim.git $home_folder".vim/bundle/tabline"
##abolish - spell check
##git clone git://github.com/tpope/vim-abolish.git $home_folder".vim/bundle/abolish"
##tabular
#_git clone git://github.com/godlygeek/tabular.git $home_folder".vim/bundle/tabular"
##visual-star-search
##git clone https://github.com/nelstrom/vim-visual-star-search $home_folder".vim/bundle/visual-star-search"
##Re-establish ownership of config files
chown -R $username:$username $home_folder".vim"
dos2unix $home_folder".vimrc"
fi