If I paste in a block of t开发者_运维问答ext 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?
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
)
For example with following command:
M-x query-replace-regex RET ^\(.*\)$ RET * \1 RET
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.
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 \&) ?*)
精彩评论