Back to Navi

Vim widget

docs/widgets/howto/VIM.md

2.24.0582 B
Original Source

Vim widget

<!-- TOC --> <!-- TOC -->

Syntax Highlighting

If you want syntax highlighting support for Navi in Vim, you need to add those syntax rules to your syntax files such as at $VIMRUNTIME/syntax/navi.vim.

The rules are defined based on the Cheatsheet syntax.

Here is an example:

vim
syntax match Comment "\v^;.*$"
syntax match Statement "\v^\%.*$"
syntax match Operator "\v^\#.*$"
syntax match String "\v\<.{-}\>"
syntax match String "\v^\$.*$"