I have the following in my .vimrc to highlight lines longer than 80 chars:
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.*/
This works quite well. However, the problem is that I would prefer it if it only worked on certain file types. Basically, any programming language should be highlighted and things like html, xml, and txt files should not be. I m pretty sure I could do this easily with an autocmd, but I m not sure if that is the best way to accomplish that goal. Anybody have any opinions?