function! NERDTreeHighlightFile(extension, fg, bg) exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#' exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:bg .' guifg='. a:fg endfunction
Ripped this from a thread on the NERDTree file highlighting stufff.
So real quick, this function is working for all filetypes except for .c files, funnily enough the ones I use the most. I'm new to vim plugins and such though so have mercy lol.
I'm no pro at regex but it looks to me like there aren't any problems in that department.
If someone could figure this out that'd be dope. Thanks.