Vim-plug: Feature request: Load plugins based on vim version

Created on 24 Jun 2019  路  2Comments  路  Source: junegunn/vim-plug

There is Command-T plugin that requires Ruby. I want to use the same .vimrc on all of my hosts, but not all of them have Ruby. So, it'd be cool if I could do something like

Plug 'wincent/Command-T', { 'vimversion': ['ruby'] }

to plug Command-T only when there is ruby support.
Neomake works fine only on Vim 8+, so it'd be

Plug 'neomake/neomake', { 'vimversion': ['>=8.0'] }

  • Type:

    • [ ] Bug

    • [x] Enhancement

    • [x] Feature Request

    • [ ] Question

  • OS:

    • [x] All/Other

    • [ ] Linux

    • [ ] OS X

    • [ ] Windows

Most helpful comment

Vim already has syntax for the versioning question:

if v:version > 800
  Plug 'SirVer/ultisnips'
  Plug 'w0rp/ale'
endif

and it works fine. Seems like this would be unnecessary functionaity.

All 2 comments

Vim already has syntax for the versioning question:

if v:version > 800
  Plug 'SirVer/ultisnips'
  Plug 'w0rp/ale'
endif

and it works fine. Seems like this would be unnecessary functionaity.

And to check if Ruby is enabled:

if has('ruby')
  Plug 'wincent/Command-T'
endif
Was this page helpful?
0 / 5 - 0 ratings