Monday, March 7, 2011

Re: re-enabling the disabled matchparen plugin

On Mon, 7 Mar 2011, John Magolske wrote:

> * Benjamin R. Haskell [110307 21:16]:
>> On Mon, 7 Mar 2011, John Magolske wrote:
>>
>>> let loaded_matchparen = 1
>>>
>>> Is there a way to load the matchparen plugin after vim has started
>>> up with it disabled in this manner?
>>
>> " pretend there never was a loaded_matchparen variable
>> unlet loaded_matchparen
>>
>> " source the file that checks for loaded_matchparen's existence in the
>> " first place, and defines the NoMatchParen and DoMatchParen commands
>> runtime plugin/matchparen.vim
>
> With these lines in my vimrc:
>
> unlet loaded_matchparen
> runtime plugin/matchparen.vim
>
> I get this error message when opening Vim:
>
> Error detected while processing /home/john/.vimrc:
> line 177:
> E108: No such variable: "loaded_matchparen"
> Press ENTER or type command to continue
>
> and cannot load the plugin with :DoMatchParen ...

Sounds about right. You asked for "a way to load the matchparen plugin
after vim has started up with it disabled in this manner". I gave it to
ya. :-)

(If you put those in your .vimrc, that precedes Vim having started up
with matchparen disabled.)


If you want something in your .vimrc:

au VimEnter * NoMatchParen

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: