You can find whitespace with the help of Git with the following command: git diff-index –check –cached. You can have […]
Tag: #whitespace
Trim trailing whitespace in vim
Sometimes you want to remove trailing whitespace from a whole file if you notice some. Doing that by hand gets […]
Heredocs with leading whitespace removed
Handy if you like to keep things indented. def initialize @foo = <<-EOF.gsub /^s+/, “” This will not be indented […]
GitHub Diffs Without Whitespace
Sometimes you want to review someones code but it’s riddled with whitespace changes that make it difficult to see what […]
git: don’t blame people for changing whitespaces or moving code
git blame will show the author of the last commit that modified the particular line. If whitespaces were removed or […]
Replace tabs with spaces in Vim
Opened a file with tabs used instead of spaces? Even just one or two? Instead of feeling like an ogre […]
Remove whitespace with git
Remove whitespace from metadata like comments: git stripspace For stripping unnecessary whitespace in code use: git apply –whitespace=fix You can […]