From bb14cbe50478b96195964029776ef119276bddca Mon Sep 17 00:00:00 2001 From: Robert Claypool Date: Wed, 14 Jun 2017 14:45:46 -0500 Subject: [PATCH] Disable if 'compatible' is set. Add a global to detect if this plugin is loaded. --- plugin/rainbow_parentheses.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugin/rainbow_parentheses.vim b/plugin/rainbow_parentheses.vim index 20ce8e5..696d524 100644 --- a/plugin/rainbow_parentheses.vim +++ b/plugin/rainbow_parentheses.vim @@ -4,6 +4,14 @@ "============================================================================== " GetLatestVimScripts: 3772 1 :AutoInstall: rainbow_parentheses.zip +" Exit quickly when: +" - this plugin was already loaded (or disabled) +" - when 'compatible' is set +if exists("g:loaded_rainbow_parentheses") || &cp + finish +endif +let g:loaded_rainbow_parentheses = 1 + com! RainbowParenthesesToggle cal rainbow_parentheses#toggle() com! RainbowParenthesesToggleAll cal rainbow_parentheses#toggleall() com! RainbowParenthesesActivate cal rainbow_parentheses#activate()