Joined December 2012
·

Andrew Gerst

Chapel Hill, NC
·
·
·

@kormie another issue I see is that this will fail for paths with spaces and it also messes up the terminal after you close vim. to fix both of these issues you should change the code to the following.

find -E . -type f -iregex ".*\.(java|js|php)$" | tr "\n" "\000" | xargs -o0 vi
:silent argdo %s/\s+$//e | w

this is broken it removes plus characters (+) from the end of a line when there is whitespace before the plus but not after it.

it should be:

:silent argdo %s/\s\+$//e | w
Posted to Vim function to unminify javascript over 1 year ago

wow!!! works great!

Achievements
107 Karma
0 Total ProTip Views