1

假设我的光标在 _

 This is line 1.
_This is line 2. 
 This is line 3.

如果我使用填充段落(meta-q),emacs 会像这样转换文本。

 This is line 1.  This is line 2.  This is line 3.

但相反,我期待这一点。

 This is line 1.
 This is line 2.  This is line 3.

目前我必须在第 2 行之前插入额外的空行

 This is line 1.

_This is line 2. 
 This is line 3.

然后调用fill-paragraph,但不是很方便。

谢谢

4

2 回答 2

1

似乎是一个很好的建议候选人:

(defadvice fill-paragraph (around start-filling-at-current-line activate)
  (save-restriction
    (narrow-to-region (line-beginning-position) (point-max))
    ad-do-it))
于 2013-11-13T01:19:29.507 回答
1

或者一个简单的函数,如果你喜欢

(defun fill-following-paragraph ()
  "Do fill-region from the current line to the end of the
buffer"
  (interactive)
  (fill-region (line-beginning-position) (point-max)))
于 2013-11-13T01:09:29.673 回答