To shed some light on what's going on. As you probably know, HTML originates from SGML. In SGML they could write something like that:
<!ELEMENT some serious stuff
Some stupid comments
that can even spread across multiple lines
more serious stuff
-- More stupid comments --
BTW. Note there's no space between <! and ELEMENT, but ...
This was a bug in Vim's HTML syntax, which @Matt has fixed with lightning-speed.
Upgrade to an upcoming version of Vim to fix this, or simply copy runtime/syntax/html.vim from Matt's fork into ~/.vim/syntax to try out his fix immediately.
With the match command, you only get 3 match ids:
:match noteHi /\[\cNOTE:[^=]*\]/
:2match todoHi /\[\cTODO:[^=]*\]/
:3match what /ever/
Each time you call these commands for a particular id (1,2,3) you replace whatever was there before. So you can have 3 different ones but that's it, only 3. If you need more, use matchadd().
Vim syntax is a beast. It takes some time to get used to it.
I suggest to try this:
syn match coqSubscript keepend /\K\d\+/ms=s+1 transparent contains=coqSubscriptDigit
syn match coqSubscriptDigit /0/ contained conceal cchar=₀
syn match coqSubscriptDigit /1/ ...
There's no built in way to do what you want to do, but you can build your way there with some vimscript.
Here's an example:
if match(a:line, '(.*)') >= 0
if match(a:line, '\.') >= 0
As Matt notes, smartindent is enough. Not only this, but cindent is actively harmful!
Many years ago, when I first got started with vim, I had these both set globally in my vimrc. Eventually, through spurious indenting issues such as these, I came to realize that in fact they make bad global settings. cindent is too specific; it works for C stuff. Don't set ...
I have found an acceptable solution.
First, use the solution provided in the Vim wiki to highlight trailing whitespace. i.e. add to ~/.vimrc:
autocmd BufReadPost,InsertEnter * match TrailingWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match TrailingWhitespace /\s\+$/
highlight TrailingWhitespace ctermbg=blue
Then, handle gitcommit using special rules. ...
This is quite a crude way to do it. Though from the various highlighting tag plugins I found -- such as https://github.com/xolox/vim-easytags and https://github.com/ludovicchabant/vim-gutentags -- this was the only solution that worked to capture all the items I wanted to grab.
Here's a python script that will generate additional tags for enums, typedefs, ...