使用 emacs 自动填充模式有什么好处?
我想知道是否应该禁用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想一个好的经验法则是其他人是否会查看该文件,以及他们是否有合理的期望文本将被填充。如果要填充文本,不妨使用自动填充。
我不确定是否有一个答案,但我在某些模式下使用自动填充,而在其他模式下则不使用。对于通常理解为具有列限制的内容:代码[评论]、提交日志。关闭自由格式文本注释、组织模式等。没有理由必须在全球范围内使用它。
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.
我曾经虔诚地使用
自动填充
,但后来对于文本文件之类的内容切换并关闭了它,而是使用longlines-mode
。不过,正如 0x4b 所说,这在某种程度上取决于您的目标受众以及您是否相信他们在选择的非 Emacs 文本编辑器中具有自动换行功能。I used to use
auto-fill
religiously but have since switched and turned it off for things like text files, usinglonglines-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.对于人类可读的文本文件,一行的长度为 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.