如何在emacs中撤消填充段? [英] How to undo fill-paragraph in emacs?

查看:100
本文介绍了如何在emacs中撤消填充段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很长的文本文件。任何简单的方法来撤销一段时间以前写入和保存的文件中的 Mq (fill-paragraph)?



例如,我想改变这一点:


他们来带我离开,
ha- HAAA!
他们来带我
离开,ho-ho,hee-hee,ha-haaa



到有趣的农场。生活是
美丽的所有的时间,我会

高兴地看到那些漂亮的年轻人在
他们干净的白色
大衣,他们是
来带我走,哈哈啊!!!!!


为此:


他们来带我离开,
ha-haaa!他们来带我
,ho-ho,hee-hee,ha-haaa



到有趣的农场。生活是
美丽的所有的时间,我将
高兴地看到那些漂亮的年轻人在
他们干净的白色大衣,他们是
来带我离开, ha-haaa !!!!!



解决方案

您可以设置 fill-columnn 到一个很大的数字,并填写。

  Cu 10000 Cx f Mx fill-个人段落

或者您可以使用一些自定义功能:

 (defun refill-paragraph-to-be-one-line()
用大填充列填充单个段落
(interactive)
(let((fill-column 100000))
(fill-individual-paragraph(point-min)(point-max)))
pre>

I have a text file that is pretty long. Any easy way to "undo" a M-q (fill-paragraph) on a file that was written and saved a while ago?

For example, I want to change this:

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!!!!!

To this:

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!!!!!

解决方案

You can set fill-columnn to a really large number, and fill.

C-u 10000 C-x f M-x fill-individual-paragraphs

Or you can use a little custom function:

(defun refill-paragraphs-to-be-one-line ()
  "fill individual paragraphs with large fill column"
  (interactive)
  (let ((fill-column 100000))
    (fill-individual-paragraphs (point-min) (point-max))))

这篇关于如何在emacs中撤消填充段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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