bronson / vim-trailing-whitespace Goto Github PK
View Code? Open in Web Editor NEWHighlights trailing whitespace in red and provides :FixWhitespace to fix it.
Highlights trailing whitespace in red and provides :FixWhitespace to fix it.
This plugin causes trailing whitespace to be highlighted in red. To fix the whitespace errors, call :FixWhitespace. By default it operates on the entire file. Pass a range (or use V to select some lines) to restrict the portion of the file that gets fixed. The repo is at http://github.com/bronson/vim-trailing-whitespace Originally based on http://vim.wikia.com/wiki/Highlight_unwanted_spaces License: cc-by-sa. The instructions this plugin is based on were licensed cc-by-sa so, until a reason to force a different license appears, we'll continue to use it. A more complete alternative is at https://github.com/ntpeters/vim-better-whitespace
vim-trailing-whitespace mistakely highlight some lines in diff mode, i.e. when writing git commit -v
messages and when opening patches.
In the diff output the first column is used as a gutter to show the status of the line: '+' for additions, '-' for removals and ' ' (a space) for context lines.
If the context line is an empty line it will be highlighted because it contains only a single white space.
Could this plugin detect that we are in diff mode (filetype=diff
) and not highlight lines composed of exactly one single space?
Repro: Just call it on a regular Coffee file
the command should restore the original cursor position and search highlight
The latest commit (9b472b1) 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.
The file doc/tags
should be in .gitignore
so this repo can be used as a git submodule with Pathogen.
Hi,
I've been using this plugin quite a long time, but recently I ran into a weird problem complaining like:
I think this error must be related to a recent PR (#27), and I suspect that the event name is called differently between Vim and NeoVim.
Is it possible to designate different event names along the different descendants of Vi?
Thank You!
Right now, vim-trailing-whitespace is complaining about the trailing space in the following line in my .vimrc:
set showbreak=↪\ \ \
However, the final space, after the third backslash, is part of the value that I am assigning to showbreak. Perhaps the whitespace-detection regexes should allow whitespace if it is preceded by a backslash?
/\s\+$/ " Current regex
/\\\@<!\s\+$/ " Proposed regex
Dear Bronson
I have been a long-term user of your plugin which highlights trailing whitespaces in text. I've recently noticed that this feature is also active in the internal terminal of Neovim, where it can be quite distracting. It would be beneficial if this functionality could be disabled by default in the terminal mode. I am willing to assist in making this adjustment if needed.
Cheers,
Stephan
Under what license is this project distributed? It would help distro integration to know.
Thank you.
sometimes, there is tab and space mixed use in a line,
could you also add this into highlight ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.