Skip to content

Commit

Permalink
增加卸载默认插件功能
Browse files Browse the repository at this point in the history
  • Loading branch information
chxuan committed Nov 21, 2019
1 parent 5d1589d commit 5019116
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ if has("gui_running")
endif

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 卸载默认插件Unplug
" 卸载默认插件UnPlug
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! s:deregister(repo)
let repo = substitute(a:repo, '[\/]\+$', '', '')
let name = fnamemodify(repo, ':t:s?\.git$??')
call remove(g:plugs, name)
endfunction
command! -nargs=1 -bar Unplug call s:deregister(<args>)
command! -nargs=1 -bar UnPlug call s:deregister(<args>)

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 插件列表
Expand Down
4 changes: 3 additions & 1 deletion .vimrc.plugins
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
" 自定义插件列表(该文件只放插件,若要增加其他配置,请放入~/.vimrc.config)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 增加~/.vimrc里没有的插件
" Plug 'iamcco/mathjax-support-for-mkdp'
" Plug 'iamcco/markdown-preview.vim'
" Plug 'Yggdroot/indentLine'
" Plug 'gorodinskiy/vim-coloresque'
" Plug 'vim-scripts/DoxygenToolkit.vim'

" Unplug 'vim-scripts/DoxygenToolkit.vim'
" 卸载/禁用~/.vimrc里的默认插件
" UnPlug 'chxuan/prepare-code'
6 changes: 1 addition & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,7 @@ function copy_files()

mkdir ~/.vim
rm -rf ~/.vim/colors
mkdir -p ~/.vim/colors
cp ${PWD}/colors/* ~/.vim/colors/
curl -sLf https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim > ~/.vim/colors/gruvbox.vim
curl -sLf https://raw.githubusercontent.com/sjl/badwolf/master/colors/badwolf.vim > ~/.vim/colors/badwolf.vim
curl -sLf https://raw.githubusercontent.com/junegunn/seoul256.vim/master/colors/seoul256.vim > ~/.vim/colors/seoul256.vim
ln -s ${PWD}/colors ~/.vim

rm -rf ~/.vim/ftplugin
ln -s ${PWD}/ftplugin ~/.vim
Expand Down

0 comments on commit 5019116

Please sign in to comment.