some tools
This commit is contained in:
parent
6a6e5aac7e
commit
60a20b79af
15
README.md
15
README.md
@ -1,14 +1,21 @@
|
||||
# VIM 插件管理系统及配置
|
||||
> 自己使用的VIM插件管理系统和配置文件,方便在各个平台实现同步更新。参考链接[VIM-PLUG](https://github.com/junegunn/vim-plug)
|
||||
> 自己使用的VIM插件管理系统和配置文件,方便在各个平台实现同步更新。
|
||||
|
||||
|
||||
## 基本安装
|
||||
## 手动安装
|
||||
|
||||
```bash
|
||||
git clone git@github.com:BruceGui/selfvimplug.git
|
||||
cd selfvimplug
|
||||
git clone git@github.com:BruceGui/vimconfplug.git
|
||||
cd vimconfplug
|
||||
cp -r autoload ~/.vim/
|
||||
cp .vimrc ~/
|
||||
```
|
||||
|
||||
然后打开VIM,使用:PlugInstall安装配置在.vimrc文件中的插件。
|
||||
|
||||
## 参考链接
|
||||
[VIM-PLUG](https://github.com/junegunn/vim-plug)
|
||||
|
||||
[OH-MY-VIM](https://github.com/liangxianzhe/oh-my-vim)
|
||||
|
||||
[OH-MY-ZSH](https://github.com/robbyrussell/oh-my-zsh)
|
||||
|
49
tools/install.sh
Normal file
49
tools/install.sh
Normal file
@ -0,0 +1,49 @@
|
||||
# 自动安装脚本
|
||||
|
||||
main() {
|
||||
|
||||
if which tput >/dev/null 2>&1; then
|
||||
ncolors=$(tput colors)
|
||||
fi
|
||||
|
||||
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
|
||||
RED="$(tput setaf 1)"
|
||||
GREEN="$(tput setaf 2)"
|
||||
YELLOW="$(tput setaf 3)"
|
||||
BLUE="$(tput setaf 4)"
|
||||
BOLD="$(tput bold)"
|
||||
NORMAL="$(tput sgr0)"
|
||||
else
|
||||
RED=""
|
||||
GREEN=""
|
||||
YELLOW=""
|
||||
BLUE=""
|
||||
BOLD=""
|
||||
NORMAL=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -n "$VIM_PLUG_CONF" ]; then
|
||||
VIM_PLUG_CONF=~/.vimplugconf
|
||||
fi
|
||||
|
||||
if [ -d "$VIM_PLUG_CONF" ]; then
|
||||
printf "${RED}You already have vim plug conf installed.${BLOD}\n"
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "${BLUE}Cloning vim plug conf...${NORMAL}\n"
|
||||
command -v git >/dev/null 2>&1 || {
|
||||
echo "Error: git is not installed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
env git clone --depth=1 git@github.com:BruceGui/vimconfplug.git $VIM_PLUG_CONF || {
|
||||
printf "Error: git clone of vim plug conf repo failed\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
main
|
Loading…
Reference in New Issue
Block a user