emacs更改默认行结尾 [英] emacs change default line ending

查看:90
本文介绍了emacs更改默认行结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows中,Emacs使用cr-lf进行换行,但是我希望所有文件都使用Unix行尾(lf)。我在会议期间找到了一种更改方法,但我不是Emacs专家,无法将解决方案转换为.emacs文件中的elisp命令。

In Windows, Emacs is using cr-lf for a linebreak, but I like all my files to use Unix line endings (lf). I found a way to change it during my session, but I am not such an Emacs guru to translate the solution into an elisp command in my .emacs file.

任何人都可以帮助我,所以Windows中的Emacs将永久使用lf?

Can anybody help me, so Emacs in Windows will use lf permanently?

推荐答案

另请参见

See also How to configure GNU Emacs to write UNIX or DOS formatted files by default?

(setq default-buffer-file-coding-system 'utf-8-unix)

这篇关于emacs更改默认行结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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