Vim variable syntax highlighting
I'd like to change my vim config file to allow highlighting of only my declared variables, not keywords. This article shows and explains what I mean: Alternate syntax highlighting I'm a beginner to vim (I've never changed the default config file). Could anyone point me in the right direction? As proof of concept, I tried let vars = ['init', 'editable', 'init_ui'] let colors = ['ff0000', '00ff00', '0000ff'] for var in vars execute 'syn keyword var_' . var var execute 'hi default var_' . var 'guifg=#' . remove(colors, 0) endfor and it worked as expected. This created syntax items for each