Hi,
I currently have a syntax file that parses a log file, very similar to the following [this is for syslog]:
syn match syslogText /.*$/
syn match syslogFacility /.\{-1,}:/ nextgroup=syslogText skipwhite
syn match syslogHost /\S\+/ nextgroup=syslogFacility,syslogText skipwhite
syn match syslogDate /^.\{-}\d\d:\d\d:\d\d/ nextgroup=syslogHost skipwhite
I'd like to, using a map, toggle whether a given group (let's say, syslogHost) is concealed or not. Is there any way to do something like the following pseudocode:
map <leader>ch :syn match syslogHost conceal!
and thereby toggle the definition of syslogHost between:
syn match syslogHost /\S\+/ nextgroup=syslogFacility,syslogText skipwhite
and
syn match syslogHost /\S\+/ nextgroup=syslogFacility,syslogText skipwhite conceal
Thanks.