Adding an "Ignore trailing spaces" text filter


it would be nice if meld came with a built-in "Ignore trailing spaces"
text filter, such as:

[ \t\r\f\v]*$

This would nicely complement the existing "All whitespace" and
"Leading whitespace".

I often need to do this because some editors automatically remove
trailing spaces which often creates spurious differences.

Also, it would be cool if you could specify a "replacement" string
with your text filter expressions. Currently the implicit replacement
string is an empty string. This is often what you want but it does not
let you do things such as creating an "ignore white space changes"
text filter such as the ones that are provided with mercurial diff.
The way this works is that all white space "blocks" (i.e. contiguous
strings of white spaces and tabs) are replaced by a single space
before the comparison is run. This means if the amount of whitespaces
between words changes the diff tool ill ignore it.

Another thing that could be done with this sort of "advanced filter"
would be to compare files that have different indent options (e.g. one
indents with tabs and the other with spaces), by replacing [\t]{1}
with " ".



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]