
Detrail: a dead-simple command line utility to fix trailing whitespace - LINKIWI
https://github.com/LINKIWI/detrail
======
stephenr
Zero dependencies... Except nodejs, which on Debian has about 60 dependencies
from memory.

 _this_ is the problem I have with the nodejs community.

I first learnt to write code using php. I still use php but that doesn't mean
I don't also use shell scripts, lua, JavaScript, hell sometimes even Java.

Just because you _can_ do something in nodejs, doesn't mean you _should_

------
samgd
sed 's/\s*$//g'

~~~
joshka
Funnily, that doesn't work as expected on OS X due to a rather old version of
sed installed by default that doesn't support \s. Try the following instead:

    
    
      sed 's/[[:blank:]]*$//g'

------
miles
Delete all trailing whitespace in vim:

    
    
      :%s/\s\+$//

------
lisperforlife
I use the following two lines to highlight extra white spaces and clean them
with a leader shortcut on vim.

    
    
        highlight ExtraWhitespace ctermbg=red guibg=red
        noremap <Leader>c :%s/\s\+$//g<CR>

