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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:11:00+00:00 2026-05-27T20:11:00+00:00

I have a line set cpoptions+=$ in my .vimrc file. However according to verbose

  • 0

I have a line

set cpoptions+=$

in my .vimrc file. However according to

verbose set cpoptions output:

cpoptions=aABceFs
Last set from /usr/share/vim/vim73/plugin/zipPlugin.vim

: it is always overridden by zipPlugin.vim. I am wondering why is vim reading these plugins after reading my .vimrc file? Any way to fix this?

  • 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-05-27T20:11:01+00:00Added an answer on May 27, 2026 at 8:11 pm

    Because vim always reads vimrc before the plugins. This load sequence makes sense because in this case you can set plugin options in the vimrc. It can’t be overriden, but you can source zipPlugin (with :source /usr/share/vim/vim73/plugin/zipPlugin.vim or :runtime plugin/zipPlugin.vim) from the vimrc. AFAIK it won’t prevent plugin from loading for the second time but as this plugin is using guard it won’t continue to the cpo resetting line when being sourced for the second time.

    Note that if your zipPlugin.vim is identical to mine, then it is not the source of the problem: if you look at its code you will see that it is saving your cpoptions setting and then restoring it. As other plugins distributed with vim must do the same or do not touch cpoptions at all then you can forget the above recommendation. I would suggest to first look that line set nocompatible (or set nocp), if any, is the first line present in the vimrc. Remember that setting this option causes many other options to reset to their defaults (including cpoptions) and it is why it must go before any other line modifying options.

    Update: Now I see that you have provided a link to the vimrc and it does not have the above problem. Try to check verbose set compatible?, then try to launch vim with the following command:

    vim --cmd 'let g:sourced_files=[] | autocmd SourcePre * if !empty(g:sourced_files) && stridx(&cpo, "$")==-1 | echomsg "cpo does not contain dollar sign after loading ".g:sourced_files[-1] | set cpo+=$ | endif | let g:sourced_files+=[expand("<amatch>")]'
    

    You will have some false positives here: first loaded vimrc (/etc/vim/vimrc): because cpo was not set, any plugins loaded like

    if exists("loaded_thlnk")
        finish
    endif
    let loaded_thlnk = 1
    let s:save_cpo = &cpo
    set cpo&vim
    
    " (This is to allow installation of thlnk.vim with just :runtime plugin/thlnk.vim
    "  without leaving vim after having thrown all files into a plugin directory :)
    runtime! plugin/thlnkuri.vim
    runtime! plugin/thlnkarr.vim
    runtime! plugin/thlnkscm.vim
    

    : here cpo is reset before plugins are loaded, but at the end there goes

    let &cpo = s:save_cpo
    

    thus it is really safe. On my system there are only false positives: though cpo is saved and restored by many plugins, no plugins forget to restore it or do something else.

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

Sidebar

Related Questions

In my .vimrc file, I have this line: set mouse=a This enables the mouse
In my .vimrc I have the following line: set textwidth=80 However, when editing the
I have a set of lines in a file where each line might represent
I have a line set cpoptions+=$ add the '$' sign as change command indicator
I have scrip contain command line: set dir=%1 cd %dir% test.bat echo successful When
I have a stored procedure that has this line: SET @SQL = 'SELECT path,title,tags
In my web worker I have a line where I set the onmessage handler
I have the below command line arguments set for the program. argument proc is
I have unsorted set of line segments without any binding to each other. Each
I have set up Eclipse Indigo to do line debugging with CFEclipse over port

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.