Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dekirisu/easy-virtual-text.vim

easily add text before/after regex matches for the view only (virtual)
https://github.com/dekirisu/easy-virtual-text.vim

vim vim-plugin virtual-text

Last synced: 11 days ago
JSON representation

easily add text before/after regex matches for the view only (virtual)

Awesome Lists containing this project

README

        

Easy Virtual Text for Vim


A simple plugin to make adding virtual text a bit easier using a 2d array. The index in the 2nd dimension determines if the text is inserted `before`, `after` or to the very `right` of the window. The highlight group `VText` determines the text styling.

> [!TIP]
> πŸ¦† You can use it to add emojis too, if your terminal setup allows it

## Example
```viml
let g:vtexts = [
\["hello ","world"],
\["🐳","emojis","πŸͺ","πŸ¦€"],
\["πŸ™€","#\[.*]","😹"]
]
au ColorScheme * hi VText guifg=#ff0000
```
![example](https://github.com/user-attachments/assets/05a4ce5a-781d-478c-918a-53e31d070296)

## Installation

If you don’t have a plugin manager of choice I recommend [vim-plug](https://github.com/junegunn/vim-plug):

```viml
Plug 'dekirisu/easy-virtual-text.vim'
```