gpt4 book ai didi

emacs - 如何撤消emacs中的填充段落?

转载 作者:行者123 更新时间:2023-12-03 23:10:53 25 4
gpt4 key购买 nike

我有一个很长的文本文件。 “撤消” M-q 的任何简单方法(fill-paragraph) 在不久前写入并保存的文件上?

例如,我想改变这个:

They're coming to take me away, ha-haaa!!
They're coming to take me away, ho-ho, hee-hee, ha-haaa

To the funny farm. Where life is beautiful all the time and I'll
be happy to see those nice young men in their clean white
coats and they're coming to take me away, ha-haaa!!!!!



对此:

They're coming to take me away, ha-haaa!! They're coming to take me away, ho-ho, hee-hee, ha-haaa

To the funny farm. Where life is beautiful all the time and I'll be happy to see those nice young men in their clean white coats and they're coming to take me away, ha-haaa!!!!!

最佳答案

使用我的 .emacs 中的以下内容:

(defun unfill-paragraph ()
(interactive)
(let ((fill-column (point-max)))
(fill-paragraph nil)))

(defun unfill-region ()
(interactive)
(let ((fill-column (point-max)))
(fill-region (region-beginning) (region-end) nil)))

我不能相信,我几年前用谷歌搜索过。

关于emacs - 如何撤消emacs中的填充段落?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2471557/

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