What you probably want is to use syntax highlighting.
Check out the vbnet.vim plugin to see a more complex example of a syntax file than is shown in the tutorial. You'll need to create your own syntax file to handle the custom formats you show in your question. You would do this by setting up various keyword
, match
, cluster
, and region
groups to get what you want. Examples of how to set up each of these groups can be found in the vbnet.vim plugin.
Once you've written your own custom syntax file, then assign those syntax groups a name as seen in the last line of vbnet.vim:
let b:current_syntax = "vbnet"
And in your .vimrc use an autocmd
to turn on that specific syntax highlighting for a specific file extention:
autocmd BufNewFile,BufRead *.vb set ft=vbnet
Adjust the highlighting of various groups in your colorscheme file.
:set ft=markdown
. However,[*]
is not part of Markdown proper; you can use+
or-
or*
.