I would like to use two autocmd, to highlight lines too long, and to highlight spaces at the end of lines, but I don't succeed, only the last of the two commands is displayed... Is it possible ?
Here is the lines concerned:
augroup vimrc_autocmds
autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#592929
autocmd BufEnter * match OverLength /\%81v.*/
autocmd BufEnter * highlight UnwantedSpaces ctermbg=red guibg=#red
autocmd BufEnter * match UnwantedSpaces /\s\+$/
augroup END
You can only use one match at a time. If you want to use multiple you can use 2match and 3match. You only have three of these to use simultaneously without defining syntax highlighting for what you're trying to match.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With