From: Simon Ruderich Date: Sun, 25 Sep 2011 22:34:24 +0000 (+0200) Subject: vimrc: Call matchadd() multiple times. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=d64d99e10cfeb62386e5e92620147e7817c01642;p=config%2Fdotfiles.git vimrc: Call matchadd() multiple times. Instead of using \( ... \| ... \) in the match. I guess this is faster and it's easier extensible. --- diff --git a/vimrc b/vimrc index a58741d..d0e67e8 100644 --- a/vimrc +++ b/vimrc @@ -358,9 +358,11 @@ if has('syntax') match Todo /\%>78v./ endif -" Highlight TODO, FIXME, CHANGED and XXX in all documents. if exists('*matchadd') - call matchadd('Todo', '\(TODO\|FIXME\|CHANGED\|XXX\)') +" Highlight TODO, FIXME, CHANGED and XXX in all documents. + for x in ['TODO', 'FIXME', 'CHANGED', 'XXX'] + call matchadd('Todo', x) + endfor endif " Settings for specific filetypes.