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 152423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:37:15+00:00 2026-05-11T09:37:15+00:00

I carry a vimrc to all the machines that I work on and it

  • 0

I carry a vimrc to all the machines that I work on and it naturally contains options that are not present in old vi.

If I accidentally start a vi session on a machine where vi is not an alias to vim and/or vim is not installed, vi reads vimrc and throws a bunch of annoying errors to let me know that option such and such are unsupported.

I know I can just always type ‘vim’ instead of ‘vi’ and set the EDITOR variable to vim (for visudo etc…), but is there a line I can add to the top of the vimrc that will exit the script early if the file is read by vi?

  • 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. 2026-05-11T09:37:16+00:00Added an answer on May 11, 2026 at 9:37 am

    If vi is not actually a link to vim, it should not read .vimrc, it should read .exrc. The fact that it is reading .vimrc indicates it is actually an earlier version of vim. If that is the case, you can use the vim ‘if’ construct to bracket newer features, like this:

    :if version >= 500 :  version-5-specific-commands :endif 

    Type:

    :help if 

    when in vim for more info.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Jquery did not carry out!!!I don't know why $(.other-edithion).click(function(){ var city = $(this).closest('#city'); if
It's known that CF indicates unsigned carry out and OF indicates signed overflow. So
I'd like to compute a value and carry that computation in the form post,
The steps I need to carry out are repetitive, but I'm not sure how
Is it a good practice to carry DB values in session variable or in
First some background: I already have a Result class that I've implemented to carry
I'm trying to carry over player_id and save to the Stakes table referencing that
How to carry a session which is made with some language i.e (java) on
Do not you know a method to carry out the following code like php?
wondering how to carry out this requirement if at all possible. I am modifying

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.