You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #5 discussed the reasons to not set list by default. The pros were that it helps people be less sloppy with whitespace, and makes it easier to navigate by paragraphs by flagging lines that look blank but contain whitespace. The cons were that it breaks copy/paste from a terminal and adds clutter.
I'd like to propose highlighting trailing whitespace by default, and possibly also space-before-tab errors. This focuses on the most common and annoying forms of whitespace sloppiness, eliminates the clutter caused by showing visible characters for spaces and tabs, and does not affect copy/paste at all. In addition, to avoid the noise of highlighting trailing spaces while in the middle of typing, I'd suggest not highlighting trailing spaces at the current cursor position.
The following .vimrc snippet implements this:
highlight link sensibleWhitespaceError Error
autocmd Syntax * syntax match sensibleWhitespaceError excludenl /\s\+\%#\@<!$\| \+\ze\t/ display containedin=ALL
The text was updated successfully, but these errors were encountered:
IMHO, this is less of an issue now, as editors like Neovim have EditorConfig built in. The risk that someone has a perfectly legit use case for using trailing spaces and they pop-ups as an "error" seems to me to be unacceptable for a setting that "everyone can agree upon."
Issue #5 discussed the reasons to not
set list
by default. The pros were that it helps people be less sloppy with whitespace, and makes it easier to navigate by paragraphs by flagging lines that look blank but contain whitespace. The cons were that it breaks copy/paste from a terminal and adds clutter.I'd like to propose highlighting trailing whitespace by default, and possibly also space-before-tab errors. This focuses on the most common and annoying forms of whitespace sloppiness, eliminates the clutter caused by showing visible characters for spaces and tabs, and does not affect copy/paste at all. In addition, to avoid the noise of highlighting trailing spaces while in the middle of typing, I'd suggest not highlighting trailing spaces at the current cursor position.
The following
.vimrc
snippet implements this:The text was updated successfully, but these errors were encountered: