Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s:savecpo errors when using with Pathogen #17

Closed
ghost opened this issue Dec 24, 2012 · 3 comments
Closed

s:savecpo errors when using with Pathogen #17

ghost opened this issue Dec 24, 2012 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 24, 2012

Vim 7.3.409
Latest pathogen and tabular straight from Github.

My config calls pathogen on the 'plugin' directory, where I have my vim plugin submodules. cpoptions is not set in my vimrc.

I get the following error when I run vim:

Error detected while processing /home/daniel/projects/vimrc/plugin/tabular/autoload/tabular.vim:
line  406:
E121: Undefined variable: s:savecpo
E15: Invalid expression: s:savecpo
line  407:
E108: No such variable: "s:savecpo"
Press ENTER or type command to continue

:Tabularize seems to work as normal, but this error is a bit aggravating. Any solution that I'm maybe overlooking?

EDIT: Setting cpoptions did not change behavior.

EDIT2: Commenting out lines 406 and 407 causes the error message to go away. Testing Tabular again under these circumstances did not seem to result in any side-effects.

@godlygeek
Copy link
Owner

I'm puzzled about how this could ever happen - the s:savecpo that's used on line 406 is defined on line 42; it really shouldn't be undefined.

I'm a bit puzzled - can you try running

vim -V20/tmp/vim.out

and reproducing the error? That should dump out a trace that shows every line of vimscript as it's executed, which should help me to figure out how s:savecpo is managing to get unset (or failing to get set) before line 406 is executed.

@ghost
Copy link
Author

ghost commented Jan 8, 2013

It seems that setting Pathogen's infection directory to be ~/.vim/plugin was a bad idea. It caused issues in my own folding plugin. The reason it causes problems is Vim already runs anything contained in ~/.vim/plugin, so it was running things twice...

After moving the pathogen infection directory, my folding issue (and this cpoptions issue) have disappeared. Sorry for the waste of time.

@ghost ghost closed this as completed Jan 8, 2013
@godlygeek
Copy link
Owner

Glad you found it - thanks for the update.

MarioJose added a commit to MarioJose/dotfiles that referenced this issue Jul 31, 2017
specifying path plugin in Vundle ('call vundle#begin()') was causing error when
load 'tabular' plugin. Probably because it was loading two times
[#17](godlygeek/tabular#17). When vim is
started, it seems load all content in '~/.vim/plugin'. Then with the line
"Plugin 'godlygeek/tabular'" in .vimrc, it load again and unset variables.

Without setting plugin path, plugins are installed in ~/.vim/bundle.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant