I'm working on large scale project where in there are ~100 engineers working on many files. I would like to see if I could add customization in emacs to remove trailing white spaces and untabify the lines which i'm editing. It wont be good idea to untabify and remove whitespaces in large files which are not related my changes. (I agree, everyone in the team should be following some basic rules. What to do, sometime it doesn't work in that way. :( ).
Currently I've enabled:
(show-ws-toggle-show-trailing-whitespace)
(show-ws-toggle-show-tabs)
Issue with these options, it makes all over files either yellow or white if owner of the file hasn't fixed his tabs and trailing whitespaces.
It would be great if you could point me to emacs options which will enable me "remove whitespaces and tabs on lines which I'm editing" (not all over the files).
This is not an answer to your question. But I suspect you will be interested to know about it:
http://github.com/glasserc/ethan-wspace
It keeps track of whether a file is "clean" (free of trailing whitespace and tabs) when you open it, and will automatically remove them when you save it if and only if it was clean when you started. This means it will keep a file clean if it started clean, and will leave alone any files that were dirty (i.e. someone else didn't follow the rules).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With