azabiong / vim-highlighter

Highlight words and expressions
MIT License
226 stars 9 forks source link

Can we expose HiSet, HiErase etc as vim commands? #23

Closed SandeepTuniki closed 1 year ago

SandeepTuniki commented 1 year ago

The documentation specifies the following default maps to trigger the basic highlights:

  let HiSet   = 'f<CR>'
  let HiErase = 'f<BS>'
  let HiClear = 'f<C-L>'
  let HiFind  = 'f<Tab>'

Can we instead expose them as vim commands (ex: :HiSet)? This allows us to invoke them in a more programmatic manner. (My use case is that I'm using neovim, and use lua scripting mostly).

azabiong commented 1 year ago

Sure, we can also use Hi commands. To set highlights:

:h Hi+

To erase highlights:

:h Hi-
SandeepTuniki commented 1 year ago

Sweet! Fits my use-case perfectly. And thanks for the quick response.

azabiong commented 1 year ago

Thanks! And for neovim lua configuration, the basic > lua section of Configuration Examples might help.