2018-01-31 14:28:46 +08:00
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
_detect () {
|
2018-05-01 21:42:57 +08:00
|
|
|
|
cp -f ../../$1 $1
|
2018-01-31 14:28:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_checkdir () {
|
2018-05-01 21:42:57 +08:00
|
|
|
|
if [[ ! -d "$1" ]]; then
|
|
|
|
|
mkdir -p $1
|
|
|
|
|
fi
|
2018-01-31 14:28:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-09-12 13:51:44 +08:00
|
|
|
|
_default_readme () {
|
|
|
|
|
cat <<EOT > README.md
|
|
|
|
|
# $1
|
|
|
|
|
> $2
|
|
|
|
|
|
|
|
|
|
This plugin is automatically detach from [SpaceVim](https://github.com/SpaceVim/SpaceVim/). you can use it without SpaceVim.
|
|
|
|
|
EOT
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-01-31 14:28:46 +08:00
|
|
|
|
main () {
|
2018-05-01 21:42:57 +08:00
|
|
|
|
case "$1" in
|
|
|
|
|
flygrep)
|
|
|
|
|
git clone https://github.com/wsdjeg/FlyGrep.vim.git detach/$1
|
|
|
|
|
cd detach/$1
|
2018-12-17 07:57:24 +08:00
|
|
|
|
_checkdir syntax/
|
2018-05-01 21:42:57 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/api
|
|
|
|
|
_checkdir autoload/SpaceVim/api/vim
|
2019-05-27 20:15:30 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/api/neovim
|
2018-05-25 21:20:49 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/api/data
|
2018-05-01 21:42:57 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/mapping
|
|
|
|
|
_checkdir autoload/SpaceVim/plugins
|
|
|
|
|
_detect autoload/SpaceVim/plugins/flygrep.vim
|
|
|
|
|
_detect autoload/SpaceVim/api.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/logger.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/vim/buffer.vim
|
2018-07-09 17:16:38 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/vim/compatible.vim
|
2019-05-22 21:54:21 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/neovim/floating.vim
|
2018-05-25 21:20:49 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/data/list.vim
|
2019-07-09 23:14:35 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/data/json.vim
|
2018-05-01 21:42:57 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/prompt.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/job.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/system.vim
|
|
|
|
|
_detect autoload/SpaceVim/mapping/search.vim
|
|
|
|
|
_detect autoload/SpaceVim/logger.vim
|
2018-12-17 07:57:24 +08:00
|
|
|
|
_detect syntax/SpaceVimFlyGrep.vim
|
2018-05-01 21:42:57 +08:00
|
|
|
|
_detect LICENSE
|
|
|
|
|
git add .
|
2019-07-09 23:14:35 +08:00
|
|
|
|
git config user.email "wsdjeg@qq.com"
|
|
|
|
|
git config user.name "SpaceVimBot"
|
2018-05-01 21:42:57 +08:00
|
|
|
|
git commit -m "Auto Update"
|
|
|
|
|
git remote add wsdjeg_flygrep https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/FlyGrep.vim.git
|
|
|
|
|
git push wsdjeg_flygrep master
|
|
|
|
|
cd -
|
|
|
|
|
rm -rf detach/$1
|
|
|
|
|
exit 0
|
|
|
|
|
;;
|
|
|
|
|
dein-ui)
|
|
|
|
|
git clone https://github.com/wsdjeg/dein-ui.vim.git detach/$1
|
|
|
|
|
cd detach/$1
|
2018-12-16 22:31:40 +08:00
|
|
|
|
_checkdir syntax/
|
2018-05-01 21:42:57 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/api
|
2018-05-01 21:54:49 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/api/data
|
2018-05-01 21:42:57 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/api/vim
|
|
|
|
|
_checkdir autoload/SpaceVim/mapping
|
|
|
|
|
_checkdir autoload/SpaceVim/plugins
|
|
|
|
|
_detect autoload/SpaceVim/plugins/manager.vim
|
|
|
|
|
_detect autoload/SpaceVim/api.vim
|
2018-05-01 22:19:16 +08:00
|
|
|
|
_detect autoload/SpaceVim/commands.vim
|
2018-05-01 21:54:49 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/job.vim
|
2019-02-13 22:25:03 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/system.vim
|
2018-05-01 21:54:49 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/data/list.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/vim/compatible.vim
|
2018-12-16 22:31:40 +08:00
|
|
|
|
_detect syntax/SpaceVimPlugManager.vim
|
2018-05-01 21:42:57 +08:00
|
|
|
|
_detect LICENSE
|
|
|
|
|
git add .
|
2019-07-09 23:14:35 +08:00
|
|
|
|
git config user.email "wsdjeg@qq.com"
|
|
|
|
|
git config user.name "SpaceVimBot"
|
2018-05-01 21:42:57 +08:00
|
|
|
|
git commit -m "Auto Update"
|
2018-05-01 21:54:49 +08:00
|
|
|
|
git remote add wsdjeg_dein_ui https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/dein-ui.vim.git
|
|
|
|
|
git push wsdjeg_dein_ui master
|
2018-05-01 21:42:57 +08:00
|
|
|
|
cd -
|
|
|
|
|
rm -rf detach/$1
|
|
|
|
|
exit 0
|
|
|
|
|
;;
|
2019-09-12 13:51:44 +08:00
|
|
|
|
iedit)
|
|
|
|
|
git clone https://github.com/wsdjeg/iedit.vim.git detach/$1
|
|
|
|
|
cd detach/$1
|
|
|
|
|
_checkdir autoload/SpaceVim/api/vim
|
|
|
|
|
_checkdir autoload/SpaceVim/api/data
|
|
|
|
|
_checkdir autoload/SpaceVim/plugins
|
|
|
|
|
_detect autoload/SpaceVim/api.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/vim/compatible.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/vim/highlight.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/data/string.vim
|
|
|
|
|
_detect autoload/SpaceVim/plugins/iedit.vim
|
|
|
|
|
_checkdir autoload/plugin
|
|
|
|
|
cat <<EOT > autoload/plugin/iedit.vim
|
|
|
|
|
"=============================================================================
|
|
|
|
|
" iedit.vim --- multiple cursor support for neovim and vim
|
|
|
|
|
" Copyright (c) 2016-2017 Shidong Wang & Contributors
|
|
|
|
|
" Author: Shidong Wang < wsdjeg at 163.com >
|
|
|
|
|
" URL: https://github.com/wsdjeg/iedit.vim
|
|
|
|
|
" License: MIT license
|
|
|
|
|
"=============================================================================
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section Introduction, intro
|
|
|
|
|
" @stylized iedit.vim
|
|
|
|
|
" @library
|
|
|
|
|
" @order intro version dicts functions exceptions layers api faq
|
|
|
|
|
" multiple cursor in vim, written in pure vim script for MacVim, gvim and vim version
|
|
|
|
|
" 8.0+.
|
|
|
|
|
"
|
|
|
|
|
|
|
|
|
|
command! -nargs=0 Iedit call SpaceVim#plugins#iedit#start()
|
|
|
|
|
EOT
|
|
|
|
|
_detect LICENSE
|
|
|
|
|
_default_readme "iedit.vim" "multiple cussor support for Vim/Neovim"
|
|
|
|
|
git add .
|
|
|
|
|
git config user.email "wsdjeg@qq.com"
|
|
|
|
|
git config user.name "SpaceVimBot"
|
|
|
|
|
git commit -m "Auto Update"
|
|
|
|
|
git remote add wsdjeg_vim_todo https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/iedit.vim.git
|
|
|
|
|
git push wsdjeg_vim_todo master
|
|
|
|
|
cd -
|
|
|
|
|
rm -rf detach/$1
|
|
|
|
|
exit 0
|
|
|
|
|
;;
|
2019-07-11 19:00:59 +08:00
|
|
|
|
vim-todo)
|
2019-07-11 22:03:07 +08:00
|
|
|
|
git clone https://github.com/wsdjeg/vim-todo.git detach/$1
|
2019-07-11 19:00:59 +08:00
|
|
|
|
cd detach/$1
|
|
|
|
|
_checkdir syntax/
|
|
|
|
|
_detect syntax/SpaceVimTodoManager.vim
|
|
|
|
|
_checkdir autoload/SpaceVim/api/vim
|
2019-07-12 08:54:13 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/api/data
|
2019-07-11 19:00:59 +08:00
|
|
|
|
_checkdir autoload/SpaceVim/plugins
|
2019-07-12 07:51:10 +08:00
|
|
|
|
_detect autoload/SpaceVim/api.vim
|
2019-07-13 12:38:01 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/logger.vim
|
2019-07-11 19:00:59 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/job.vim
|
2019-07-12 08:54:13 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/system.vim
|
|
|
|
|
_detect autoload/SpaceVim/api/data/string.vim
|
2019-07-12 07:51:10 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/file.vim
|
2019-07-11 19:00:59 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/vim/buffer.vim
|
2019-07-12 07:51:10 +08:00
|
|
|
|
_detect autoload/SpaceVim/api/vim/compatible.vim
|
2019-07-13 12:38:01 +08:00
|
|
|
|
_detect autoload/SpaceVim/logger.vim
|
2019-07-12 07:51:10 +08:00
|
|
|
|
_detect autoload/SpaceVim/plugins/todo.vim
|
2019-07-11 19:00:59 +08:00
|
|
|
|
_detect LICENSE
|
|
|
|
|
git add .
|
|
|
|
|
git config user.email "wsdjeg@qq.com"
|
|
|
|
|
git config user.name "SpaceVimBot"
|
|
|
|
|
git commit -m "Auto Update"
|
2019-07-11 22:03:07 +08:00
|
|
|
|
git remote add wsdjeg_vim_todo https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-todo.git
|
2019-07-11 19:00:59 +08:00
|
|
|
|
git push wsdjeg_vim_todo master
|
|
|
|
|
cd -
|
|
|
|
|
rm -rf detach/$1
|
|
|
|
|
exit 0
|
|
|
|
|
;;
|
2018-05-01 21:42:57 +08:00
|
|
|
|
spacevim-theme)
|
|
|
|
|
exit 0
|
|
|
|
|
esac
|
2018-01-31 14:28:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
main $@
|