1 Star 0 Fork 2

h3l/vim

forked from xianyo/vim 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
install.sh 2.12 KB
一键复制 编辑 原始数据 按行查看 历史
xianyo 提交于 2014-07-27 00:19 +08:00 . add tag plugin
#!/bin/bash
if [ "steup" = "$0" ]; then
echo "Step0: Installing packages"
if which apt-get >/dev/null; then
sudo apt-get install -y vim vim-gnome ctags xclip astyle python-setuptools python-dev git cscope Cmake global
elif which yum >/dev/null; then
sudo yum install -y gcc vim git ctags xclip astyle python-setuptools python-devel cscope Cmake global
fi
##Add HomeBrew support on Mac OS
if which brew >/dev/null;then
echo "You are using HomeBrew tool"
brew install vim ctags git astyle cscope global
##Fix twisted installation Error in Mac caused by Xcode Version limit
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install twisted
fi
fi
CURRENT_DIR=`pwd`
lnif() {
if [ -e "$1" ]; then
ln -sf "$1" "$2"
fi
}
echo "Step1: setting up files"
if [ "$HOME/.vim" = $CURRENT_DIR ]; then
mv $HOME/.vimrc $HOME/.vimrc_bak
lnif $CURRENT_DIR/vimrc $HOME/.vimrc
echo "In .vim dir"
else
mv $HOME/.vim $HOME/.vim_bak
mv $HOME/.vimrc $HOME/.vimrc_bak
lnif $CURRENT_DIR/vimrc $HOME/.vimrc
lnif "$CURRENT_DIR/" "$HOME/.vim"
fi
echo "Step2: install vundle"
if [ ! -e $CURRENT_DIR/bundle/vundle ]; then
echo "Installing Vundle"
git clone https://github.com/gmarik/vundle.git $CURRENT_DIR/bundle/vundle
else
echo "Upgrade Vundle"
cd "$HOME/.vim/bundle/vundle" && git pull origin master
fi
echo "Step3: update/install plugins using Vundle"
system_shell=$SHELL
export SHELL="/bin/sh"
echo "installing ...." > xianyovim
echo "sucess auto exit" >> xianyovim
echo "please wait" >> xianyovim
vim xianyovim +BundleInstall! +BundleClean +qall
rm xianyovim
export SHELL=$system_shell
if [ "steup" = "$0" ]; then
echo "Step4: compile YouCompleteMe"
echo "It will take a long time, just be patient!"
echo "If error,you need to compile it yourself"
echo "cd $CURRENT_DIR/bundle/YouCompleteMe/ && bash -x install.sh --clang-completer"
cd $CURRENT_DIR/bundle/YouCompleteMe/
bash -x install.sh --clang-completer
fi
#vim bk and undo dir
if [ ! -d /tmp/vimbk ]
then
mkdir -p /tmp/vimbk
fi
if [ ! -d /tmp/vimundo ]
then
mkdir -p /tmp/vimundo
fi
echo "Install Done!"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/h3l/vim.git
git@gitee.com:h3l/vim.git
h3l
vim
vim
master

搜索帮助