vim-plug icon indicating copy to clipboard operation
vim-plug copied to clipboard

Add a command that allows plugin toggling on the fly

Open skamsie opened this issue 5 years ago • 1 comments

Would it be possible to add a command that allows plugin toggling on the fly so it can be used for autocommands? I am aware of the options for disabling plugins in the vimrc or by disabling them for certain filetypes, but this cannot be done in a programmatic way.

Why? To be able to disable plugins that do not offer an easy way to be toggled any other way. For example:

autocommand User AirlineToggledOn :PlugDisable 'plugin_name'
autocommand User AirlineToggledOff :PlugEnable 'plugin_name'
  • Type:
    • [ ] Bug
    • [x] Enhancement
    • [x] Feature Request
    • [ ] Question
  • OS:
    • [x] All/Other
    • [ ] Linux
    • [ ] OS X
    • [ ] Windows
  • Vim:
    • [ ] Terminal Vim
    • [ ] GVim
    • [ ] Neovim

skamsie avatar Dec 01 '20 14:12 skamsie

Vim and Neovim do not support plugin namespaces to be able to toggle plugins without side-effects. Try :Disarm from https://github.com/tpope/vim-scriptease. Else, file an issue at https://github.com/vim/vim/issues.

janlazo avatar Mar 03 '21 01:03 janlazo