1

I tried

syn match texStatement '\\\[' contained conceal cchar=⟦                         
syn match texStatement '\\\]' contained conceal cchar=⟧                         
syn match texStatement '\\~' contained conceal cchar=X

The last line did not work, and even if I did, how do I use (space) rather than X.

2
  • 1
    Try '\\\~' based on :help /~
    – D. Ben Knoble
    Aug 15, 2022 at 18:06
  • Can you rephrase the last sentence? I guess you mean to write "how do I use a space rather than X?", that is, that the dangling 1 was supposed to be a question mark? Aug 16, 2022 at 6:35

1 Answer 1

3

The last line does not work because you need to escape tilde. To use a space instead of X, you can simply write a space. So, this should work:

syntax match texStatement '\\\~' contained conceal cchar= 

Notice that the last character above is a space character!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.