/easy-virtual-text.vim

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

Primary LanguageVim ScriptMIT LicenseMIT

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

let g:vtexts = [
    \["hello ","world"],
    \["🐳","emojis","πŸͺ","πŸ¦€"],
    \["πŸ™€","#\[.*]","😹"]
]
au ColorScheme * hi VText guifg=#ff0000

example

Installation

If you don’t have a plugin manager of choice I recommend vim-plug:

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