问题
I am using Github's atom text editor.
Most of the times, when I modify a single line in a file, git diff
shows a lot of lines as deleted and added back in this way
- @op_contact = "Not Available"
+ @op_contact = "Not Available"
This causes inconvenience in code-reviews and hence I am forced to use other editors like SublimeText.
It looks like some simple setting should fix this, but I am not sure how to do it and I don't know what to search for. There are some related questions, like this one but I want to fix it from Atom editor, as this problem is not present in SublimeText.
Atom version: 1.3.1
回答1:
You are probably searching for the Whitespace package which ships with Atom by default.
It removes unnecessary whitespace at the end of each line. Disable it and your suspicious line changes should be gone.
来源:https://stackoverflow.com/questions/34896982/github-atom-editor-shows-line-deleted-and-added-back