Reputation: 42235
I'm trying to set up a conceal (vim 7.3 only, if has('conceal') == 1
) for words previously defined as keywords
, but keywords seem to be immune to conceal. A minimal example in a clean buffer:
:set cole=2
:set ft=none
:syntax keyword Function foo baz qux
:syntax match Function "foo" conceal cchar=%
:syntax match Function "bar" conceal cchar=&
Now if you type foo bar
and move to the next line, you should see foo &
. How can I get it to show % &
?
If the answer is you can't conceal a keyword, are there alternate ways of defining multiple keywords reliably? In my use case, I have about 5k keywords, but only about 10-20 that I wish to conceal.
Upvotes: 1
Views: 169
Reputation: 195219
conceal
argument can be used for keyword
as well
replace this line:
:syntax match Function "foo" conceal cchar=%
with
:syntax keyword Function foo conceal cchar=%
you could get what you want.
hope it helps
Upvotes: 3