Why?
"Trailing whitespace is indeed commit noise."
Just drop this in one of your settings files:
"trim_trailing_white_space_on_save": true
Open the bundle editor (⌃⌥⌘B) and open “Text” → “Menu Actions” → “Converting / Stripping” → “Remove Trailing Spaces in Document / Selection”.
Then in the drawer put callback.document.export
in Semantic Class and Document / Replace Document
as Input / Output.
- http://sartak.org/2011/03/end-of-line-whitespace-in-vim.html/
- Another way to make sure to remove all trailing whitespace in a file is to set an autocmd in your .vimrc file. Every time the user issues a :w command, Vim will automatically remove all trailing whitespace before saving.
autocmd BufWritePre * :%s/\s\+$//e
The IDE has a preference to remove trailing whitespace.
Preferences -> Java -> Editors -> Save Actions
- Check "Perform the selected actions on save"
- Check "Additional actions" and click the "Configure.." button.
- In the "Code organizing" tab, check "Remove trailing whitespace"