emacs:Orgmode,如何从一行行中创建一个列表 [英] emacs: Orgmode, how to make a list from a block of lines
问题描述
有没有办法隐藏这样的线条
Is there a way to covert such block of lines
line1
line2
linen
into
1. line1
2. line2
n. linen
使用Emacs 组织模式
推荐答案
不知道是否有直接的方式,还没有听说过至少。但是一种方法是使用 string-rectangle
( Cx rt
)来准备&code> 1。 到所有行,然后点击 Cc Cc
更新编号。
don't know if there is a direct way, haven't heard of it yet at least. But one approach would be to use string-rectangle
(C-x r t
) to prepand 1.
to all lines and then hit C-c C-c
to update the numbering.
code> string-rectangle 你可以用以下方式来表示:
For string-rectangle
you would put point and mark the following way:
v---mark
line1 with some text
line2 with more text
<---point
之后 Mx:string-rectangle:1。
你会得到:
1. line1 with some text
1. line2 with more text
点击 Cc Cc
会给你正确的编号!
Hitting C-c C-c
will give you the correct numbering!
更容易,因为它给你视觉反馈是启用 CUA模式
,并使用 C-return
创建一个矩形选择,然后您可以开始并行地对所有行进行打字。另请参阅YouTube上的此视频。
Easier because it gives you visual feedback is to enable CUA-mode
and use C-return
to create a rectangle selection, then you can start typing on all lines in parallel. See also this video on youtube.
这篇关于emacs:Orgmode,如何从一行行中创建一个列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!