Giter Site home page Giter Site logo

Vim version dependencies about vim-plug HOT 3 CLOSED

junegunn avatar junegunn commented on July 19, 2024
Vim version dependencies

from vim-plug.

Comments (3)

vheon avatar vheon commented on July 19, 2024

So what are you proposing? What would you write in your vimrc?

from vim-plug.

junegunn avatar junegunn commented on July 19, 2024

Something like this?

Plug 'Valloric/YouCompleteMe', { 'do': './install.sh', 'if': v:version > 703 }

If that's what you're proposing, I'd given thought about providing such syntactic sugar, but decided not to do it, because:

  1. It has some gotchas. You can't use s: variables and functions inline, which makes you unnecessarily expose functions and variables as globals (g:). (And I should mention this limitation in the documentation.)
  2. And I don't think using native if statement is messy. I also use several conditional statements (https://github.com/junegunn/dotfiles/blob/master/vimrc#L50-L52). If there are several plugins that share a condition it's more concise to group those in an if-clause than to repeat the same if option.

So I concluded it wasn't really worth it especially since I prefer to keep the set of options as small as possible. But I'm still open to suggestions. Let me know if you have different ideas.

from vim-plug.

steeef avatar steeef commented on July 19, 2024

Thanks for the explanation. I think that makes sense, especially your examples, @junegunn. Consider it closed.

from vim-plug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.