diff --git a/autoload/rainbow.vim b/autoload/rainbow.vim index 10551c5..11ded8b 100644 --- a/autoload/rainbow.vim +++ b/autoload/rainbow.vim @@ -1,6 +1,9 @@ " Copyright 2013 LuoChen (luochen1990@gmail.com). Licensed under the Apache License 2.0. -if exists('s:loaded') | finish | endif | let s:loaded = 1 +if exists('s:loaded') + finish +endif +let s:loaded = 1 fun s:trim(s) return substitute(a:s, '\v^\s*(.{-})\s*$', '\1', '') @@ -79,7 +82,11 @@ fun rainbow#syn(config) exe 'syn cluster '.prefix.'Regions contains='.join(map(range(cycle), '"@".s:synGroupID(prefix, "Regions", v:val)'), ',') exe 'syn cluster '.prefix.'Parentheses contains='.join(map(range(cycle), '"@".s:synGroupID(prefix, "Parentheses", v:val)'), ',') exe 'syn cluster '.prefix.'Operators contains='.join(map(range(cycle), '"@".s:synGroupID(prefix, "Operators", v:val)'), ',') - if has_key(conf, 'after') | for cmd in conf.after | exe cmd | endfor | endif + if has_key(conf, 'after') + for cmd in conf.after + exe cmd + endfor + endif endfun fun rainbow#syn_clear(config) diff --git a/autoload/rainbow_main.vim b/autoload/rainbow_main.vim index 91499c0..f652e0a 100644 --- a/autoload/rainbow_main.vim +++ b/autoload/rainbow_main.vim @@ -114,7 +114,9 @@ fun rainbow_main#load() endfun fun rainbow_main#clear() - if !exists('b:rainbow_confs') | return | endif + if !exists('b:rainbow_confs') + return + endif for conf in b:rainbow_confs call rainbow#hi_clear(conf) call rainbow#syn_clear(conf) diff --git a/plugin/rainbow_main.vim b/plugin/rainbow_main.vim index 340ca20..b9783ea 100644 --- a/plugin/rainbow_main.vim +++ b/plugin/rainbow_main.vim @@ -1,6 +1,9 @@ " Copyright 2013 LuoChen (luochen1990@gmail.com). Licensed under the Apache License 2.0. -if exists('s:loaded') || !(exists('g:rainbow_active') || exists('g:rainbow_conf')) | finish | endif | let s:loaded = 1 +if exists('s:loaded') || !(exists('g:rainbow_active') || exists('g:rainbow_conf')) + finish +endif +let s:loaded = 1 command! RainbowToggle call rainbow_main#toggle() command! RainbowToggleOn call rainbow_main#load()