不喜欢空行,但不用空行的话在orgmode中编辑的内容太过拥挤,如何增加段落之间的间距?尤其是标题前后
加大标题字体?
(setq line-spacing 10)
这个怎么样? C-h v line-spacing.
顺便一提:空行是 Org 语法上 分割多个段落的分隔符。如果你不用空行,如下文本在 Org 语法中属于同一段落
只有一个 paragraph:
Additional space to put between lines when displaying a buffer.
The space is measured in pixels, and put below lines on graphic displays,
see ‘display-graphic-p’.
If value is a floating point number, it specifies the spacing relative
to the default frame line height. A value of nil means add no extra space.
两个 paragraphs:
Additional space to put between lines when displaying a buffer.
The space is measured in pixels, and put below lines on graphic displays,
see ‘display-graphic-p’.
If value is a floating point number, it specifies the spacing relative
to the default frame line height. A value of nil means add no extra space.
line-spacing
会将所有行都加间隔
之前想过这个思路,但后面感觉自己需求不是那么强,就没有继续做
(defun add-line-spacing-at-beginning ()
"Add extra spacing at the beginning of each line in the current buffer."
(interactive)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
;; Create an overlay at the beginning of the line with a space
(let ((overlay (make-overlay (point) (point))))
(overlay-put overlay 'before-string
(propertize "\u200b" 'display '(height 1.8))))
(forward-line 1))))
(defun remove-line-spacing-at-beginning ()
"Remove extra spacing at the beginning of each line in the current buffer."
(interactive)
(remove-overlays (point-min) (point-max)))
3 个赞