Everything between brackets will be yellow.
: syn clear
: hi MyStuff ctermfg=yellow
: syn match MyStuf /\[.*\]/
If you wan’t to save this, put everything in a file under ~/.vim/syntax/mystuff.vim.
Add this at the end of the file you wan’t to highlight :
set vim: syn=mystuff:
That was quick’n'dirty !
I use this for highlighting timestamps on my text notes.
Tags: vim