Can virtual text overwrite existing text?

已查看 24 次
跳至第一个未读帖子

Girish

未读,
2023年11月22日 13:29:512023/11/22
收件人 vim_use
When I add 1 letter of virtual text through prop_add() it shifts the remaining text on the line by one character. Is it possible to make it overwrite existing text so there is no shifting of characters?
Thank you
girish

Tony Mechelynck

未读,
2023年11月22日 14:00:132023/11/22
收件人 vim...@googlegroups.com
This is documented at ":help virtual-text". Depending on how you call
prop_add() your virtual text, which IIUC can be more than one
character long, pushes whatever is after it either horizontally or
vertically. If you want no shifting of characters it is possible to
display the virtual text "in column zero" and in that case "it will be
displayed above, below or after the actual text" depending on the
"text_align" and "text_wrap" arguments. Since the virtual text is not
editable it is not possible to place the cursor on it.

Best regards,
Tony.
回复全部
回复作者
转发
0 个新帖子