When I analyze log files in
vim I often create ad-hoc syntax highlighting rules for better orientation. For example
:syntax match myerror match /NullPointerException/ :highlight myerror ctermbg=red
So far so good. But sometimes I create quite complex rules during a long editing session and I want to save all created ad-hoc rules so I can reuse them. I can print them:
:syntax myerror xxx match /NullPointerException/ :highlight myerror xxx ctermbg=4
But this output contains not only ad-hoc rules and it cannot be simply copied to
.vimrc or to a new syntax file because of different format. The
:makevimrc does not save syntax highlighting rules at all.
Any idea how to export ad-hoc coloring rules?