Vim - Highlight Cells in Markdown Tables

As I was currently editing tables in markdown, I wanted to color table cells based on content : green for yes, red for no and yellow for ?. So I made a PR about this for the plugin vim-table-mode. But it’s possible to implement it outside of the plugin by adding the following in your vimrc : syntax match Table '|.\+|' contains=yesCell,noCell,maybeCell syntax match yesCell '|\@<= *yes[^|]*' contained syntax match noCell '|\@<= *no[^|]*' contained syntax match maybeCell '|\@<= *?...

October 5, 2021 · 1 min · Jonas DOREL