使用 emacs 自动填充模式有什么好处?

发布于 2024-10-08 10:17:43 字数 112 浏览 3 评论 0原文

我想知道是否应该禁用 emacs 自动填充模式还是保留它。

我为什么要禁用它?

我为什么要保留它?

除了个人偏好之外,是否还有其他因素或可能影响我个人偏好的因素?

I am wondering whether I should disable emacs auto-fill-mode it or keep it.

Why would I want to disable it?

Why would I want to keep it?

Are there any factors other than personal preference, or anything that may influence my personal preference?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

满身野味 2024-10-15 10:17:43

我想一个好的经验法则是其他人是否会查看该文件,以及他们是否有合理的期望文本将被填充。如果要填充文本,不妨使用自动填充。

我不确定是否有一个答案,但我在某些模式下使用自动填充,而在其他模式下则不使用。对于通常理解为具有列限制的内容:代码[评论]、提交日志。关闭自由格式文本注释、组织模式等。没有理由必须在全球范围内使用它。

I guess a good rule of thumb is whether anyone else will be looking at the file, and whether they have a reasonable expectation the text will be filled. If it's going to be filled text, you might as well use auto-fill.

I'm not sure there is a single answer, but I use auto-fill in some modes and not in others. On for things that are commonly understood to have a column limit: code [comments], commit logs. Off for free form text notes, org-mode, etc. There's no reason it has to be used globally.

茶底世界 2024-10-15 10:17:43

我曾经虔诚地使用自动填充,但后来对于文本文件之类的内容切换并关闭了它,而是使用longlines-mode。不过,正如 0x4b 所说,这在某种程度上取决于您的目标受众以及您是否相信他们在选择的非 Emacs 文本编辑器中具有自动换行功能。

I used to use auto-fill religiously but have since switched and turned it off for things like text files, using longlines-mode instead. As 0x4b says, though, it somewhat depends on your target audience and whether or not you believe they have an auto-wrap function in their non-Emacs text editor of choice.

年少掌心 2024-10-15 10:17:43

对于人类可读的文本文件,一行的长度为 80 个字符几乎是一个标准,并且不能超过这个长度。如果你想遵守这个规则,自动填充模式肯定会帮助你。是的,有些编辑器会为您自动换行,但如果您的目的是在不止一行中编写 5 行段落,那么自动填充模式肯定会对您有所帮助。

当编写任何不受计算机限制的内容(配置文件、源代码等)时,我总是打开自动填充模式。它的存在是有原因的。适当的时候使用它。

For human readable text files, it's almost a standard for a line to be 80 characters long, and not more than that. If you want to obey this rule, auto-fill-mode will certainly help you. Yes, there are editors that will do automatic word wrapping for you, but if your intentions are to write 5 lines paragraphs in more than one line, then auto-fill-mode will certainly help you.

When writing anything that is not computer bound (configuration files, source code, etc...), I always turn on auto-fill-mode. It's there for a reason. Use it when appropriate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文