I'm using Thoughtbot's dotfiles, which installs Syntastic by default. Since I'm using Neovim, I'd like for a way to disable the prevent Syntastic from being installed and install Neomake instead.
For sample, I'd like to do something like this:
" In Thoughtbot's .vimrc
Plug 'scrooloose/syntastic'
...
" In my .vimrc
Unplug 'scrooloose/syntastic'
Plug 'benekastah/neomake'
Is something like that possible? Thanks in advance!
P.S. Thanks for creating such a great plugin manager!
NVIM 0.1.2
Build type: RelWithDebInfo
Compilation: /usr/local/Library/ENV/4.3/clang -Wconversion -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99
-Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim20160307-12635-1qupgzn/neovim-0.1.2/b
uild/config -I/tmp/neovim20160307-12635-1qupgzn/neovim-0.1.2/src -I/tmp/neovim20160307-12635-1qupgzn/neovim-0.1.2/deps-build/usr/include -I/tmp/neovim201603
07-12635-1qupgzn/neovim-0.1.2/deps-build/usr/include -I/tmp/neovim20160307-12635-1qupgzn/neovim-0.1.2/deps-build/usr/include/luajit-2.0 -I/tmp/neovim2016030
7-12635-1qupgzn/neovim-0.1.2/deps-build/usr/include -I/tmp/neovim20160307-12635-1qupgzn/neovim-0.1.2/deps-build/usr/include -I/tmp/neovim20160307-12635-1qup
gzn/neovim-0.1.2/deps-build/usr/include -I/tmp/neovim20160307-12635-1qupgzn/neovim-0.1.2/deps-build/usr/include -I/usr/local/opt/gettext/include -I/usr/incl
ude -I/usr/include -I/tmp/neovim20160307-12635-1qupgzn/neovim-0.1.2/build/src/nvim/auto -I/tmp/neovim20160307-12635-1qupgzn/neovim-0.1.2/build/include
Compiled by [email protected]
Optional features included (+) or not (-): +acl +iconv +jemalloc
For differences from Vim, see :help vim-differences
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.1.2/share/nvim"
g:plugs: call remove(g:plugs, 'syntastic')Plug 'scrooloose/syntastic', { 'on': [] }(1 and 2 should be done before call plug#end())
Thanks!
Just for the record, this solution worked for me.
The plugin must be removed from both g:plugs and g:plugs_order,
so I created the UnPlug command which call a custom function.
vimrc:
function! s:deregister(repo)
let repo = substitute(a:repo, '[\/]\+$', '', '')
let name = fnamemodify(repo, ':t:s?\.git$??')
call remove(g:plugs, name)
call remove(g:plugs_order, index(g:plugs_order, name))
endfunction
command! -nargs=1 -bar UnPlug call s:deregister(<args>)
call plug#begin('~/.vim/bundle')
" Load bundles
source ~/.vim/bundle.vim
" Load bundles of the fork
if filereadable(expand("~/.vim/bundle.fork"))
source ~/.vim/bundle.fork
endif
" Load bundles of the local machine
if filereadable(expand("~/.vim/bundle.local"))
source ~/.vim/bundle.local
endif
call plug#end()
delcom UnPlug
bundle.vim:
" ...
Plug 'kien/ctrlp.vim'
" ...
bundle.local:
" Disable
UnPlug 'kien/ctrlp.vim'
" Replace
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
The plugin must be removed from both g:plugs and g:plugs_order
Hmm, you're right. I'll make the code ignore any entry in g:plugs_order that is not found in g:plugs.
Most helpful comment
Just for the record, this solution worked for me.
The plugin must be removed from both
g:plugsandg:plugs_order,so I created the
UnPlugcommand which call a custom function.vimrc:bundle.vim:bundle.local: