I found the following code that will highlight all unnecessary whitespace, but I really want it to also highlight all the tabs in my code. I played around with a lot of variations that didn't work but I couldn't find a regex that would do both. Any ideas?
highlight RedundantWhitespace ctermbg=red guibg=red
match RedundantWhitespace /\s\+$\| \+\ze\t/
Edit: adding samples by request:
Okay so in the samples below I am using \t to represent tab and % to represent a trailing whitespace that I want vim to highlight in red.
/tOh hi here is some text%%%%
/t/tHere is some indented text%%%
So on the first line there are 1 tab that should have their spaces highlighted in red and 4 trailing spaces to have highlighted in red. On the second line there are 2 tabs and 3 trailing whitespaces to have highlighted in red.