bronson / vim-trailing-whitespace

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

Latest commit causes an error message #26

Closed blochl closed 1 year ago

blochl commented 1 year ago

The latest commit (9b472b1f6e825990ad8fa444142e749b55fe05aa) causes the following error message:

Error detected while processing /home/lbloch/.vim/plugged/vim-trailing-whitespace/plugin/trailing-whitespace.vim:
line   19:
E216: No such group or event: TermOpen * if ShouldMatchWhitespace() | match ExtraWhitespace /\\\@<![\u3000[:space:]]\+$/ | else | match ExtraWhitespace /^^/ | endif

System: fully updated Ubuntu 22.04.

PabloScolpino commented 1 year ago

Created https://github.com/bronson/vim-trailing-whitespace/pull/27 to fix this.

davidroeca commented 1 year ago

This fix breaks in neovim which still uses TermOpen

PabloScolpino commented 1 year ago

I'll try to fix this for both.

PabloScolpino commented 1 year ago

This solves the issue for both, but it is not clean. https://github.com/bronson/vim-trailing-whitespace/pull/28

I am not a vimscript expert by any means, so I'd like to see how this should be improved.

superjamie commented 1 year ago

I introduced this error, apologies.

airline found the same thing but they just removed Neovim terminal support altogether. That's a pretty undesirable solution: https://github.com/vim-airline/vim-airline/issues/1828

I commented a solution for this plugin on https://github.com/bronson/vim-trailing-whitespace/pull/28

bronson commented 1 year ago

Fixed by #30. Please re-opoen if there's still an issue.