In Vim, how do I highlight (match, to be precise) only the angular brackets and their contents if they are at the beginning of a line, in the following
[1-2-A 3.2.1.] Text goes here ... some more text ...
which then continues here. [This should not be highlighted]
Some more text here.
The second pair should not be highlighted.
I’d appreciate any help on this one!
This short pattern works:
Long version(if nested brackets are not allowed):
Non-greedy version