2

I'm playing with conceal in help files to highlight / colour specific text strings which was working fine until I added the :print: example below.

conceal example

Using this concealed all the : as expected so I tried to escape the : around the word print

 :%s/[^[:print:]]//g : 

The original conceal statement was

syntax match myIgnoreHc /[:#]|[#:]/ contained conceal -Oopswrong original
syn match myhelpCommentHc       "[:#]\s.\{-}\s[:#]\s" contains=myIgnoreHc

I changed the match to

syntax match myIgnoreHc /[:#]\s\S\|\S\s[#:]/ contained conceal 

which worked if I wrote the :print: as : :print : however I'd prefer to escape or tell the parser to ignore the match in certain situations eg :: or ## as the :print : isn't what I was after :).

Any suggestions?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.