12

If I paste in a block of text composed of separated lines, is there any way to convert each of those lines into either headlines or TODO list items? So:

item
item
item

becomes:

* item
* item
* item

without my having to type [Meta][Return] at the begging of each line?

Dmitri
  • 2,658
  • 2
  • 25
  • 41

4 Answers4

13

With a default org-mode configuration, select your lines up to and including the newline at the end of the last line, and do M-x org-toggle-heading. With a prefix argument, it tells org-mode how many levels in it should make the heading (C-u 4 M-x org-toggle-heading)

jdd
  • 4,301
  • 1
  • 27
  • 28
  • 11
    This command is bound to `C-c *`. A similar command turns lines into plain list items (bound to `C-c -`. – Juancho Jul 11 '11 at 23:11
2

For example with following command:

M-x query-replace-regex RET ^\(.*\)$ RET * \1 RET
Alex Ott
  • 80,552
  • 8
  • 87
  • 132
2

Select your three lines, and while your cursor is on the first column of the fourth line type C-xrt*SPACERET. This calls the string-rectangle to insert the string *[space] in the vertical selection delimited by the mark and the cursor (i.e., the first column). C-xrt is a very useful command when editing aligned text.

adl
  • 15,627
  • 6
  • 51
  • 65
0

To convert the line prefix from a Workflowy export (0-n leading spaces followed by a single -):

M-x replace-regexp RET ^ *- RET \,(make-string (length \&) ?*)
vdm
  • 481
  • 4
  • 8