bronson / vim-trailing-whitespace

Highlights trailing whitespace in red and provides :FixWhitespace to fix it.
453 stars 62 forks source link

add autocmd for filetype changes #21

Closed ZwodahS closed 4 years ago

ZwodahS commented 4 years ago

Use Cases :

Some plugins create buffers (i.e. Defx) and the filetype isn't ignored even when g:extra_whitespace_ignored_filetypes is set. I believed that the filetype is set after, hence no autocmd is triggered.

This fix should fix it.

bronson commented 4 years ago

I've never seen this but this SO agrees with your assessment: https://stackoverflow.com/questions/23496243/autocommand-for-new-file-of-specific-filetype#23496504

Looks good, thanks!