Possible marks are {a-zA-Z'}
. Is there a mechanism to set more of them? The goal is to track certain (modifiable) lines and detect when they are deleted (e.g. with dd
).
Background
I am building a UI to manipulate pairs of UUID and strings. A subset of pairs is loaded onto the buffer for editing. Only strings (on each line) are meant to be edited and UUID should be hidden. One method is to place UUID along with the string and conceal it. But UUIDs can get unintentionally deleted with concealcursor=nvic
while changing the string, e.g. with cc
. Marks will allow the addition, deletion and modification of string lines without losing track. Ideally, the plugin will create a mark for a line with its UUID as identifier (instead of {a-zA-Z'}
).
Effectively I want to "annotate" a line with a piece of text that stays consistent after addition/deletion of lines above it and gets removed along with the line on deletion.
:h textprop
. Now you wouldn't annotate with a piece of text but something more like a highlight. This may be adaptable to your purposes, though.textprop
led to find a more direct analogue in nvim asapi-extended-marks
. You saved the day when I was about to reimplement marks.