Github atom editor shows line deleted and added back

北城余情 提交于 2019-12-10 17:12:38

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!