-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·167 lines (146 loc) · 5.24 KB
/
install.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
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#!/bin/zsh
ROOT=`pwd`
BLUE='\e[1;34m'
CYAN='\e[1;36m'
RED='\e[1;31m'
GREEN='\e[1;32m'
NC='\e[0m'
os_type=`uname -s`
if [ $os_type == "Darwin" ]; then
echo -e "${RED}Uninstalling msgpack-python${NC}"
pip3 uninstall msgpack-python
echo -e "${GREEN}Installing msgpack${NC}"
pip3 install -U msgpack
brew install node mono cmake macvim shortcat
# jump to definition for java
brew install --HEAD universal-ctags/universal-ctags/universal-ctags
brew install ripgrep
else
echo -e "${GREEN}Updating package cache${NC}"
sudo apt-get update
echo -e "${GREEN}Updating dependencies${NC}"
sudo apt-get install build-essential cmake vim-nox python3-dev mono-complete nodejs default-jdk npm ripgrep zsh
echo -e "${GREEN}installing pip for autocomplete plugin${NC}"
sudo apt-get install -y python3-pip
echo -e "${RED}Uninstalling msgpack-python${NC}"
pip3 uninstall msgpack-python
echo -e "${GREEN}Installing msgpack${NC}"
pip3 install -U msgpack
fi
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo -e "${GREEN}Installing vim-plug${NC}"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo -e "${GREEN}Installing zoxide${NC}"
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh
# Oh My Zsh
echo -e "${GREEN}Installing oh my zsh${NC}"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo -e "${GREEN}Copying zshrc${NC}"
cp zshrc ~/.zshrc
echo -e "${GREEN}Installing k${NC}"
git clone https://github.com/supercrabtree/k $ZSH_CUSTOM/plugins/k
# Starship stuffery
echo -e "${GREEN}Installing Starship${NC}"
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
mkdir -p ~/.config
cp ./starship.toml ~/.config/
cp ./starship-git-user.sh /usr/local/bin/
cp ./starship-git.sh /usr/local/bin/
pip3 install --user pynvim
echo -e "${GREEN}Copying vimrc${NC}"
sudo cp vimrc ~/.vimrc
echo -e "${GREEN}Copying inputrc${NC}"
sudo cp inputrc ~/.inputrc
echo -e "${GREEN}Copying xinitrc${NC}"
sudo cp xinitrc ~/.xinitrc
echo -e "${GREEN}Copying Xmodmap${NC}"
sudo cp Xmodmap ~/.Xmodmap
echo -e "${GREEN}Copying tmux.conf${NC}"
sudo cp .tmux.conf ~/
echo -e "${GREEN}Copying Xresources${NC}"
sudo cp Xresources ~/.Xresources
echo -e "${CYAN}Merging Xresources${NC}"
xrdb -merge ~/.Xresources
echo -e "${GREEN}Copying git config${NC}"
sudo cp .gitconfig ~/
echo -e "${GREEN}Installing tmux${NC}"
sudo apt-get install tmux
echo -e "${GREEN}Installing ctags${NC}"
sudo apt-get install ctags
echo -e "${GREEN}Installing vim-plug${NC}"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo -e "${GREEN}Installing lombok.jar${NC}"
mkdir $HOME/lombok
sudo wget https://projectlombok.org/downloads/lombok.jar -P $HOME/lombok/
sudo chmod +x $HOME/lombok.jar
################################
# Plugins
################################
echo -e "${GREEN}Copying pathogen${NC}"
git clone https://github.com/tpope/vim-pathogen.git pathogen
sudo cp -r ./pathogen/* ~/.vim
echo -e "${GREEN}installing tmux conf${NC}"
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf ~/.tmux.conf
cp .tmux/.tmux.conf.local ~/.tmux.conf.local
echo -e "${GREEN}Setting git diff and merge tool"
git config --global diff.tool vimdiff
git config --global merge.tool vimdiff
################################
# Syntax
################################
echo -e "${GREEN}Copying ftdetect${NC}"
sudo cp -rf ./ftdetect ~/.vim
echo -e "${GREEN}Copying ftplugin${NC}"
sudo cp -rf ./ftplugin ~/.vim
echo -e "${GREEN}Copying syntax${NC}"
sudo cp -rf ./syntax ~/.vim
################################
# Bundles
################################
# delete the current bundle folder in
# the vim directory
if [ -d ~/.vim/bundle ]; then
sudo rm -rf ~/.vim/bundle
fi
mkdir -p bundle
cd bundle
echo -e "${GREEN}Installing Vundle${NC}"
git clone https://github.com/VundleVim/Vundle.vim.git
echo -e "${GREEN}Installing easy motion${NC}"
git clone https://github.com/Lokaltog/vim-easymotion.git
echo -e "${GREEN}Installing vim go${NC}"
git clone https://github.com/fatih/vim-go.git
echo -e "${GREEN}Installing syntastic${NC}"
git clone --depth=1 https://github.com/vim-syntastic/syntastic.git
echo -e "${GREEN}Installing git-gutter${NC}"
git clone git://github.com/airblade/vim-gitgutter.git
echo -e "${GREEN}Symlinking bundle folder${NC}"
sudo ln -s `pwd` ~/.vim/bundle
echo -e "${GREEN}Exporting variables to .bash_profile${NC}"
echo "export PATH=$PATH:/$HOME/go/bin" >> $HOME/.bash_profile
mkdir -p $HOME/go
mkdir -p $HOME/go/bin
go get -u github.com/golang/lint/golint
# opening vim
echo -e "${GREEN}Run PluginInstall and GoInstallBinaries${NC}"
echo -e "${GREEN}press enter to start vim${NC}"
read -r b
vim test.go
# install YouCompleteMe
echo -e "${GREEN}Compiling YouCompleteMe Server${NC}"
cd ~/.vim/plugged/YouCompleteMe
python3 install.py --all
cd $ROOT
has_vi_mode=`cat $HOME/.inputrc | grep vi-command`
if [[ -z $has_vi_mode ]]; then
echo -e "${GREEN}Update inputrc with vim keybindings${NC}"
echo "set editing-mode vi" >> $HOME/.inputrc
echo "set keymap vi-command" >> $HOME/.inputrc
fi
echo -e "${GREEN}Initializing zoxide${NC}"
zoxide init --cmd cd zsh
echo -e "${RED}Finished${NC}"