update vimplus
This commit is contained in:
parent
5019116cf1
commit
22b3f1cdb3
8
.vimrc
8
.vimrc
@ -163,8 +163,8 @@ Plug 'vim-scripts/indentpython.vim'
|
||||
Plug 'docunext/closetag.vim'
|
||||
|
||||
" 自定义插件
|
||||
if filereadable(expand($HOME . '/.vimrc.plugins'))
|
||||
source $HOME/.vimrc.plugins
|
||||
if filereadable(expand($HOME . '/.vimrc.custom.plugins'))
|
||||
source $HOME/.vimrc.custom.plugins
|
||||
endif
|
||||
|
||||
call plug#end()
|
||||
@ -352,6 +352,6 @@ nnoremap <leader>G :GV!<cr>
|
||||
nnoremap <leader>gg :GV?<cr>
|
||||
|
||||
" 自定义设置
|
||||
if filereadable(expand($HOME . '/.vimrc.config'))
|
||||
source $HOME/.vimrc.config
|
||||
if filereadable(expand($HOME . '/.vimrc.custom.config'))
|
||||
source $HOME/.vimrc.custom.config
|
||||
endif
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" 自定义设置(该文件放一般性配置,若要增加插件,请放入~/.vimrc.plugins)
|
||||
" 自定义设置(该文件放一般性配置,若要增加插件,请放入~/.vimrc.custom.plugins)
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" 开启相对行号
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" 自定义插件列表(该文件只放插件,若要增加其他配置,请放入~/.vimrc.config)
|
||||
" 自定义插件列表(该文件只放插件,若要增加其他配置,请放入~/.vimrc.custom.config)
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" 增加~/.vimrc里没有的插件
|
||||
@ -95,7 +95,7 @@ An automatic configuration program for vim
|
||||
|
||||
## 自定义
|
||||
|
||||
`~/.vimrc`为vimplus的默认配置,一般不做修改,若要增加插件,请修改 `~/.vimrc.plugins`,其他配置请放入`~/.vimrc.config`。
|
||||
`~/.vimrc`为vimplus的默认配置,一般不做修改,若要增加、卸载插件,请修改 `~/.vimrc.custom.plugins`,其他配置请放入`~/.vimrc.custom.config`。
|
||||
|
||||
|
||||
## 插件列表
|
||||
|
||||
24
install.sh
24
install.sh
@ -80,10 +80,10 @@ function backup_vimrc_file()
|
||||
fi
|
||||
}
|
||||
|
||||
#备份原有的.vimrc.plugins文件
|
||||
function backup_vimrc_plugins_file()
|
||||
#备份原有的.vimrc.custom.plugins文件
|
||||
function backup_vimrc_custom_plugins_file()
|
||||
{
|
||||
old_vimrc_plugins=$HOME"/.vimrc.plugins"
|
||||
old_vimrc_plugins=$HOME"/.vimrc.custom.plugins"
|
||||
is_exist=$(is_exist_file $old_vimrc_plugins)
|
||||
if [ $is_exist == 1 ]; then
|
||||
time=$(get_datetime)
|
||||
@ -95,10 +95,10 @@ function backup_vimrc_plugins_file()
|
||||
fi
|
||||
}
|
||||
|
||||
#备份原有的.vimrc.config文件
|
||||
function backup_vimrc_config_file()
|
||||
#备份原有的.vimrc.custom.config文件
|
||||
function backup_vimrc_custom_config_file()
|
||||
{
|
||||
old_vimrc_config=$HOME"/.vimrc.config"
|
||||
old_vimrc_config=$HOME"/.vimrc.custom.config"
|
||||
is_exist=$(is_exist_file $old_vimrc_config)
|
||||
if [ $is_exist == 1 ]; then
|
||||
time=$(get_datetime)
|
||||
@ -129,8 +129,8 @@ function backup_vim_dir()
|
||||
function backup_vimrc_and_vim()
|
||||
{
|
||||
backup_vimrc_file
|
||||
backup_vimrc_plugins_file
|
||||
backup_vimrc_config_file
|
||||
backup_vimrc_custom_plugins_file
|
||||
backup_vimrc_custom_config_file
|
||||
backup_vim_dir
|
||||
}
|
||||
|
||||
@ -347,11 +347,11 @@ function copy_files()
|
||||
rm -rf ~/.vimrc
|
||||
ln -s ${PWD}/.vimrc ~
|
||||
|
||||
rm -rf ~/.vimrc.plugins
|
||||
cp ${PWD}/.vimrc.plugins ~
|
||||
rm -rf ~/.vimrc.custom.plugins
|
||||
cp ${PWD}/.vimrc.custom.plugins ~
|
||||
|
||||
rm -rf ~/.vimrc.config
|
||||
cp ${PWD}/.vimrc.config ~
|
||||
rm -rf ~/.vimrc.custom.config
|
||||
cp ${PWD}/.vimrc.custom.config ~
|
||||
|
||||
rm -rf ~/.ycm_extra_conf.py
|
||||
ln -s ${PWD}/.ycm_extra_conf.py ~
|
||||
|
||||
@ -89,12 +89,12 @@ function backup_vimrc_file()
|
||||
fi
|
||||
}
|
||||
|
||||
#备份原有的.vimrc.plugins文件
|
||||
function backup_vimrc_plugins_file()
|
||||
#备份原有的.vimrc.custom.plugins文件
|
||||
function backup_vimrc_custom_plugins_file()
|
||||
{
|
||||
user=$1
|
||||
home_path=$2
|
||||
old_vimrc_plugins=$home_path".vimrc.plugins"
|
||||
old_vimrc_plugins=$home_path".vimrc.custom.plugins"
|
||||
is_exist=$(is_exist_file $old_vimrc_plugins)
|
||||
if [ $is_exist == 1 ]; then
|
||||
time=$(get_datetime)
|
||||
@ -107,12 +107,12 @@ function backup_vimrc_plugins_file()
|
||||
fi
|
||||
}
|
||||
|
||||
#备份原有的.vimrc.config文件
|
||||
function backup_vimrc_config_file()
|
||||
#备份原有的.vimrc.custom.config文件
|
||||
function backup_vimrc_custom_config_file()
|
||||
{
|
||||
user=$1
|
||||
home_path=$2
|
||||
old_vimrc_config=$home_path".vimrc.config"
|
||||
old_vimrc_config=$home_path".vimrc.custom.config"
|
||||
is_exist=$(is_exist_file $old_vimrc_config)
|
||||
if [ $is_exist == 1 ]; then
|
||||
time=$(get_datetime)
|
||||
@ -147,8 +147,8 @@ function backup_vim_dir()
|
||||
function backup_vimrc_and_vim()
|
||||
{
|
||||
backup_vimrc_file $1 $2
|
||||
backup_vimrc_plugins_file $1 $2
|
||||
backup_vimrc_config_file $1 $2
|
||||
backup_vimrc_custom_plugins_file $1 $2
|
||||
backup_vimrc_custom_config_file $1 $2
|
||||
backup_vim_dir $1 $2
|
||||
}
|
||||
|
||||
@ -230,13 +230,13 @@ function install_to_user_on_linux()
|
||||
cp -R $src_vimplus_path $desc_home_path
|
||||
chown -R $desc_username":"$desc_username $desc_vimplus_path
|
||||
|
||||
rm -rf $desc_home_path".vimrc.plugins"
|
||||
cp $desc_vimplus_path".vimrc.plugins" $desc_home_path
|
||||
chown $desc_username":"$desc_username $desc_home_path".vimrc.plugins"
|
||||
rm -rf $desc_home_path".vimrc.custom.plugins"
|
||||
cp $desc_vimplus_path".vimrc.custom.plugins" $desc_home_path
|
||||
chown $desc_username":"$desc_username $desc_home_path".vimrc.custom.plugins"
|
||||
|
||||
rm -rf $desc_home_path".vimrc.config"
|
||||
cp $desc_vimplus_path".vimrc.config" $desc_home_path
|
||||
chown $desc_username":"$desc_username $desc_home_path".vimrc.config"
|
||||
rm -rf $desc_home_path".vimrc.custom.config"
|
||||
cp $desc_vimplus_path".vimrc.custom.config" $desc_home_path
|
||||
chown $desc_username":"$desc_username $desc_home_path".vimrc.custom.config"
|
||||
|
||||
# 创建软链接
|
||||
rm -rf $desc_home_path".vimrc"
|
||||
|
||||
@ -43,16 +43,16 @@ function update_vim_plugin()
|
||||
# 拷贝文件
|
||||
function copy_files()
|
||||
{
|
||||
vimrc_plugins=$HOME"/.vimrc.plugins"
|
||||
vimrc_plugins=$HOME"/.vimrc.custom.plugins"
|
||||
is_exist=$(is_exist_file $vimrc_plugins)
|
||||
if [ $is_exist != 1 ]; then
|
||||
cp ${PWD}/.vimrc.plugins ~
|
||||
cp ${PWD}/.vimrc.custom.plugins ~
|
||||
fi
|
||||
|
||||
vimrc_config=$HOME"/.vimrc.config"
|
||||
vimrc_config=$HOME"/.vimrc.custom.config"
|
||||
is_exist=$(is_exist_file $vimrc_config)
|
||||
if [ $is_exist != 1 ]; then
|
||||
cp ${PWD}/.vimrc.config ~
|
||||
cp ${PWD}/.vimrc.custom.config ~
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user