[dune-fem] Trailing white spaces.
Robert Kloefkorn
robertk at posteo.de
Fri Nov 21 17:45:19 CET 2014
Hello dune-fem,
I just ran a script to clean all source files in dune-fem, so that
commit diffs are no longer messed up by white space changes caused by
automatic white space removals.
Many editors can do this by default, e.g. for vim add the following
lines to your .vimrc
" remove trailing white space at the end of lines in source files
autocmd BufWritePre *.hh,*.hpp,*.cc,*.cpp,*.h,*.c,*.patch,*.sh :%s/\s\+$//e
After you added this line to your .vimrc you can use the following
command to clean your own repositories if you want.
find . -type f \( -name "*.cc" -o -name "*.hh" -o -name "*.hpp" -o -name
"*.cpp" -o -name "*.h" -o -name "*.c" \) -exec vim -c "wq" {} \;
No warranty, though.
Best,
Rob
More information about the dune-fem
mailing list