Gedit 在文件末尾添加一行 [英] Gedit adds line at end of file

查看:36
本文介绍了Gedit 在文件末尾添加一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题的答案一定在某个地方,但我没有找到——谁能帮我理解为什么在 Gedit 中,如果我有一页代码,则没有额外的尾随空行,但是当我做一个文件时比较我的 svn commit 它显示在文件末尾添加了额外的行?

我感觉 Gedit 会自动添加结束换行符.但为什么,我不知道...

解决方案

现实终于胜利了,而且已经修复

a>,但破坏行为仍然是默认的;在终端中启用 WYSIWYG 行为

gsettings set org.gnome.gedit.preferences.editor ensure-trailing-newline false

The answer to this must be somewhere but I'm not finding it -- can anyone help me understand why in Gedit, if I have a page of code there is no extra trailing blank line, but then when I do a file comparison for my svn commit it shows an extra line being added at the end of the file?

I have a feeling that Gedit is automatically adding an ending line break. But why, I have no idea...

解决方案

Reality finally won and it's been fixed, but the broken behavior is still the default; enable the WYSIWYG behavior in a terminal with

gsettings set org.gnome.gedit.preferences.editor ensure-trailing-newline false

这篇关于Gedit 在文件末尾添加一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆