emacs: Orgmode, how to make a list from a block of lines

前端 未结 4 1729
盖世英雄少女心
盖世英雄少女心 2021-02-01 07:02

Is there a way to covert such block of lines

line1  
line2 
linen

into

1. line1
2. line2
n. linen

Using Emac

4条回答
  •  隐瞒了意图╮
    2021-02-01 07:18

    the shortest way I know of is: highlight the lines, including their newline character,

    line1
    line2
    line3
    

    Then execute M-x org-ctrl-c-minus (press C-c -) and you will get

    - line1  
    - line2 
    - line3
    

    Then run M-x org-shiftright (press ) twice and you get the desired

    1. line1  
    2. line2 
    3. line3
    

提交回复
热议问题