gpt4 book ai didi

emacs 更改默认行结尾

转载 作者:行者123 更新时间:2023-12-01 17:31:19 33 4
gpt4 key购买 nike

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

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

最佳答案

根据 Brian Burns 的评论,将其用于现代 Emacs。

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

在 Emacs 23.2 之前,您会使用

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

另请参阅How to configure GNU Emacs to write UNIX or DOS formatted files by default?

关于emacs 更改默认行结尾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9760290/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com