Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8321119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:54:28+00:00 2026-06-08T22:54:28+00:00

I was looking around for it for quite a while. I want to add

  • 0

I was looking around for it for quite a while.

I want to add a line to a vim plugin file that would disable it if running on unsupported version of vim.

I remember from somewhere that it goes something like that:

if version > 730
    "plugin code goes here
endif

but that fail.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:54:30+00:00Added an answer on June 8, 2026 at 10:54 pm

    The versioning scheme is different; Vim 7.3 is 703, not 730.

    Also, for clarity, I would recommend using v:version (this is a special Vim variable).

    Often, it is also better to check for the availability of features ( e.g. exists('+relativenumber')) than testing for the Vim version that introduced the feature, because Vim can be custom-compiled with different features.

    Finally, plugins typically do the guard the other way around:

    if v:version < 703
        finish
    endif
    " Plugin goes here.
    

    And it’s a good practice to combine this with an inclusion guard. This allows individual users to disable a (system-wide) installed plugin:

    " Avoid installing twice or when in unsupported Vim version.
    if exists('g:loaded_pluginname') || (v:version < 700)
        finish
    endif
    let g:loaded_pluginname = 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking around for quite a while and feel that I have a
I have been looking around for a visualization framework that would aid graph visualization
I've been looking around quite a while now for an answer but since I'm
I've been looking around for a while and haven't quite found what I've been
I've been looking around quite a bit to solve my issue. I got many
I've been looking around the CherryPy documentation, but can't quite get my head around
Looking around, I can't name a single web application (not web service) that uses
I've been looking around Google and SO and haven't quite found an answer to
I've been looking around for a solution to this, but haven't quite found one.
I've been looking around for quite some time now, and I can't get a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.