简体   繁体   English

Github atom编辑器显示删除行并添加回来

[英]Github atom editor shows line deleted and added back

I am using Github's atom text editor. 我正在使用Github的原子文本编辑器。 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 大多数情况下,当我修改文件中的单行时, git diff显示许多行被删除并以这种方式添加回来

 -      @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. 这会导致代码评论带来不便,因此我不得不使用像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编辑器修复它,因为SublimeText中没有这个问题。

Atom version: 1.3.1 Atom版本:1.3.1

You are probably searching for the Whitespace package which ships with Atom by default. 您可能正在搜索默认情况下随Atom一起提供的Whitespace软件包。

It removes unnecessary whitespace at the end of each line. 它删除每行末尾不必要的空格。 Disable it and your suspicious line changes should be gone. 禁用它,您的可疑线路更改应该消失。

Atom Whitespace包

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM