Next: Sparse trees, Previous: Motion, Up: Document Structure

### 2.5 Structure editing

`M-<RET>` (`org-insert-heading`)
  Insert new heading with same level as current. If the cursor is in a plain list item, a new item is created (see Plain lists). To force creation of a new headline, use a prefix argument, or first press <RET> to get to the beginning of the next line. When this command is used in the middle of a line, the line is split and the rest of the line becomes the new headline1. If the command is used at the beginning of a headline, the new headline is created before the current line. If at the beginning of any other line, the content of that line is made the new heading. If the command is used at the end of a folded subtree (i.e. behind the ellipses at the end of a headline), then a headline like the current one will be inserted after the end of the subtree.
`C-<RET>` (`org-insert-heading-respect-content`)
  Just like `M-<RET>`, except when adding a new heading below the current heading, the new heading is placed after the body instead of before it. This command works from anywhere in the entry.
`M-S-<RET>` (`org-insert-todo-heading`)
  Insert new TODO entry with same level as current heading. See also the variable `org-treat-insert-todo-heading-as-state-change`.
`C-S-<RET>` (`org-insert-todo-heading-respect-content`)
  Insert new TODO entry with same level as current heading. Like `C-<RET>`, the new headline will be inserted after the current subtree.
`<TAB>` (`org-cycle`)
  In a new entry with no text yet, the first <TAB> demotes the entry to become a child of the previous one. The next <TAB> makes it a parent, and so on, all the way to top level. Yet another <TAB>, and you are back to the initial level.
`M-<left>` (`org-do-promote`)
  Promote current heading by one level.
`M-<right>` (`org-do-demote`)
  Demote current heading by one level.
`M-S-<left>` (`org-promote-subtree`)
  Promote the current subtree by one level.
`M-S-<right>` (`org-demote-subtree`)
  Demote the current subtree by one level.
`M-S-<up>` (`org-move-subtree-up`)
  Move subtree up (swap with previous subtree of same level).
`M-S-<down>` (`org-move-subtree-down`)
  Move subtree down (swap with next subtree of same level).
`C-c C-x C-w` (`org-cut-subtree`)
  Kill subtree, i.e. remove it from buffer but save in kill ring. With a numeric prefix argument N, kill N sequential subtrees.
`C-c C-x M-w` (`org-copy-subtree`)
  Copy subtree to kill ring. With a numeric prefix argument N, copy the N sequential subtrees.
`C-c C-x C-y` (`org-paste-subtree`)
  Yank subtree from kill ring. This does modify the level of the subtree to make sure the tree fits in nicely at the yank position. The yank level can also be specified with a numeric prefix argument, or by yanking after a headline marker like ‘`****`’.
`C-y` (`org-yank`)
  Depending on the variables `org-yank-adjusted-subtrees` and `org-yank-folded-subtrees`, Org's internal `yank` command will paste subtrees folded and in a clever way, using the same command as `C-c C-x C-y`. With the default settings, no level adjustment will take place, but the yanked tree will be folded unless doing so would swallow text previously visible. Any prefix argument to this command will force a normal `yank` to be executed, with the prefix passed along. A good way to force a normal yank is `C-u C-y`. If you use `yank-pop` after a yank, it will yank previous kill items plainly, without adjustment and folding.
`C-c C-x c` (`org-clone-subtree-with-time-shift`)
  Clone a subtree by making a number of sibling copies of it. You will be prompted for the number of copies to make, and you can also specify if any timestamps in the entry should be shifted. This can be useful, for example, to create a number of tasks related to a series of lectures to prepare. For more details, see the docstring of the command `org-clone-subtree-with-time-shift`.
`C-c C-w` (`org-refile`)
  Refile entry or region to a different location. See Refiling notes.
`C-c ^` (`org-sort-entries-or-items`)
  Sort same-level entries. When there is an active region, all entries in the region will be sorted. Otherwise the children of the current headline are sorted. The command prompts for the sorting method, which can be alphabetically, numerically, by time (first timestamp with active preferred, creation time, scheduled time, deadline time), by priority, by TODO keyword (in the sequence the keywords have been defined in the setup) or by the value of a property. Reverse sorting is possible as well. You can also supply your own function to extract the sorting key. With a `C-u` prefix, sorting will be case-sensitive. With two `C-u C-u` prefixes, duplicate entries will also be removed.
`C-x n s` (`org-narrow-to-subtree`)
  Narrow buffer to current subtree.
`C-x n w` (`widen`)
  Widen buffer to remove narrowing.
`C-c *` (`org-toggle-heading`)
  Turn a normal line or plain list item into a headline (so that it becomes a subheading at its location). Also turn a headline into a normal line by removing the stars. If there is an active region, turn all lines in the region into headlines. If the first line in the region was an item, turn only the item lines into headlines. Finally, if the first line is a headline, remove the stars from all headlines in the region.

When there is an active region (Transient Mark mode), promotion and demotion work on all headlines in the region. To select a region of headlines, it is best to place both point and mark at the beginning of a line, mark at the beginning of the first headline, and point at the line just after the last headline to change. Note that when the cursor is inside a table (see Tables), the Meta-Cursor keys have different functionality.

#### Footnotes

[1] If you do not want the line to be split, customize the variable `org-M-RET-may-split-line`.