1

I created my own syntax file tailored to UVM log files, in which each line is formatted in the same way:

<msg severity> <path>(<line number>) @ <simulation time>: <hierarchy> [<id>] <message>

example: enter image description here

I defined the syntax without any "conceal", because by default the reader would want to see all the parts of all the messages.

However, I wonder if having broken up the line to different syntax constructs can be leveraged to allow some simple command to conceal and unconceal parts of the message.

For example if I have defined

syn region filepath start="\/" end="[^\(]\+" oneline

it would be awesome to be able to type something like

:conceal syn filepath

and have it be recognized because "filepath" is defined as a syntax.

Or better yet, conceal the type of syntax that's under the cursor.

Then later I would want to be able to undo it, in case I suddenly want to look at the file paths.

Cheers

2
  • 2
    I don't think you can conditionally hide individual syntax groups. Conceal is either on or off (with the exception of how concealcursor works).
    – D. Ben Knoble
    Commented Jun 29, 2022 at 19:43
  • Oh well. Once I realized that line wrap doesn't take conceal into consideration, the appeal of conceal went way down. Thanks
    – Shoeman
    Commented Jun 30, 2022 at 9:41

1 Answer 1

2

I don't think you can conditionally hide individual syntax groups. Conceal is either on or off ('conceallevel'), with the exception of how 'concealcursor' works.

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.