Skip to main content

Questions tagged [text-properties]

Properties that can be attached to text in a buffer and that will move with the text. Mainly used to highlight text and thus they can be used as a replacement for syntax highlighting.

Filter by
Sorted by
Tagged with
0 votes
1 answer
25 views

When should I prefer text-propeties to pattern-matching for highlighting?

What are text-properties for? I've gone through some of :help text-properties. I guess the key is here The main use for text properties is to highlight text. This can be seen as a replacement for ...
Enlico's user avatar
  • 2,276
2 votes
1 answer
79 views

How to obtain the virtual text in a text property?

I am writing tests for a small plugin which adds text properties with virtual text to a buffer. I want to check what a text property's virtual text is on a given line. Failing that, I would like to ...
Andy Stewart's user avatar
  • 1,359
0 votes
2 answers
421 views

How do I sort lines based on a text property?

I would like to tag lines with a certain text property and then sort all lines with that text property to come to the top. How can I sort based on having a text property rather than a pattern match?
Julius Hamilton's user avatar