org.nvim

Document structure

Headlines start with one or more stars followed by a space (a line of stars alone is text, like in Emacs):

* TODO [#A] Headline text                              :tag1:tag2:
  SCHEDULED: <2026-09-23 Wed> DEADLINE: <2026-09-30 Wed>
  :PROPERTIES:
  :ID:       0c7a...
  :END:
  Body text.
** Child headline
<M-CR>          (ctx) Insert a new headline or list item (in a table: split
                the field, see org-tables), then
                enter Insert mode, like org-meta-return:
                - In Insert mode it acts at the cursor: at the start of a
                  headline the new one goes above it; in the title the
                  rest of the title moves to the new headline (the tags
                  stay); at the start of a text line that line becomes a
                  headline; elsewhere in a line the line is split. In a
                  list, at or before the item text the new item goes
                  before it; elsewhere the rest of the item (and its
                  sub-items) moves to the new item.
                  meta_return_split_line (org-M-RET-may-split-line)
                  turns splitting off: false, or per context
                  { headline = false, item = true }.
                - In Normal mode it acts at the end of the line without
                  splitting it (in column 0 of a headline or text line:
                  at its start). So on a headline the new one goes right
                  below the headline line, in a list after the item and
                  its sub-items (also in column 0; use i<M-CR> there
                  for an item before it).
                - A folded headline gets the new one after its subtree.
                - With a count (C-u, 4<M-CR>): always a headline, after
                  the current subtree; 16<M-CR> (C-u C-u): at the end of
                  the parent's subtree.
                New headlines get a blank line before them when the
                current one has one (blank_before_new_entry.heading =
                "auto"); new items when the items of the list are
                separated by blank lines (plain_list_item = "auto").
                With insert_heading_respect_content new headlines always
                go after the current subtree. Every new headline fires
                the User autocmd OrgInsertHeading (org-insert-heading-hook;
                data holds bufnr and lnum), before M-S-RET adds its
                TODO keyword.
<M-S-CR>        Like <M-CR>, but a TODO headline (with the keyword of the
                current entry, or the first one when it is done or with
                a count) or an item with an empty checkbox. M-RET never
                copies a checkbox.
<prefix>ih      Insert headline after the current subtree
<C-CR>          (org-insert-heading-respect-content). Before the first
                headline, after the text.
<prefix>it      Insert TODO headline after the subtree
<C-S-CR>        (org-insert-todo-heading-respect-content).
<C-c><CR>       (ctx) Outside tables: insert a headline like <M-CR>.
<prefix>is      Insert a subheading: a headline below the current line,
                demoted (org-insert-subheading). In a list: an item,
                indented.
:Org insert_todo_subheading  The same with a TODO keyword, or a checkbox
                item in a list (org-insert-todo-subheading).
:Org edit_headline  Edit the title of the current headline in a prompt,
                keeping its keyword, priority and tags (org-edit-headline).
:Org convert_to_odd_levels  Rewrite the file to odd levels only: level 2
                becomes 3, 3 becomes 5... (org-convert-to-odd-levels).
:Org convert_to_oddeven_levels  The reverse (org-convert-to-oddeven-levels);
                refused when the file has an even level. Both ask first.
<prefix>id      Insert a drawer at the cursor (Insert mode splits the line,
<C-c><C-x>d     like Emacs), or around the Visual selection. With a count
                (C-u), a property drawer.
<prefix>ib      Insert a structure template (org-insert-structure-template):
<C-c><C-,>      #+begin_TYPE / #+end_TYPE around the selection, or an
                empty block at the cursor; the cursor goes inside, or
                after #+begin_src  to type the language. Types come from
                structure_template_alist (a export ascii, c center,
                C comment, e example, E export, h export html, l export
                latex, q quote, s src, v verse); TAB asks for any type,
                written in upper case for #+BEGIN_/#+END_.
<s<Tab>         With tempo = true (the org-tempo module), < plus a key
                of structure_template_alist then <Tab> in Insert mode
                expands to that block; <L, <H, <A, <i
                (tempo_keywords) to #+latex: , #+html: , #+ascii: ,
                #+index: , and <I asks for a file to #+include:.
<< / >>         (ctx) Promote / demote headline or list item. Count repeats.
<s / >s         (ctx) Promote / demote the whole subtree or item and its
                children.
<M-h> / <M-l>   (ctx) Promote / demote. In a table: move column.
<M-Left> / <M-Right>  Same as <M-h> / <M-l> (Alt + arrow keys).
<M-H> / <M-L>   (ctx) Promote / demote subtree. In a table: delete / insert
                column. Elsewhere an error, like Emacs.
<M-h> / <M-l>   In Visual mode: promote / demote every headline of the
                selection, or outdent / indent every item. The selection
                stays (edit_keep_region, org-edit-keep-region), also
                for <M-k> / <M-j>.
Promotion keeps the spacing of the headline and realigns its tags. With
odd_levels_only (#+STARTUP: odd, org-odd-levels-only) the level changes
by two.

List items follow org-list rules: an item with children cannot be outdented alone (use <M-H>), the first item of a list cannot be indented alone, and <M-L> / <M-H> on the first item move the whole list. A * bullet that reaches column 0 becomes -. After each change the list is repaired: numbers, bullets of siblings, sub-list indentation, parent checkboxes.

<M-k> / <M-j>   (ctx) Move subtree, list item or table row up / down; a
<M-Up> / <M-Down>  count moves past that many siblings. Elsewhere, drag the
                element (paragraph, block, drawer, table...) past the
                previous / next one, keeping blank lines in place
                (org-drag-element-backward / forward). In Visual mode:
                move the selected subtrees past the previous / next sibling
                when the selection starts at a headline, else move the
                selected lines.
<prefix>K / J   Move subtree up / down.
<M-K> / <M-J>   (ctx) Outside tables: drag the line at the cursor up / down
                (org-drag-line-backward / forward). Count repeats. On a
                CLOCK timestamp: see org-clock (S-M-Up/Down).
<prefix>hy      Copy subtree (count: that many siblings).
<prefix>hd      Cut subtree.
<prefix>hp      Paste subtree like org-paste-subtree: in column 0 of a
<C-c><C-x><C-y> headline, before it with its level; elsewhere before the
                next visible headline, at the deeper level of the visible
                headlines before and after. On an empty headline (***)
                its stars give the level. Count 4 (C-u): after the current
                subtree at its level; 16 (C-u C-u): as the first child;
                other counts: that level. A subtree that was folded when
                copied is pasted folded. Subtrees are kept in a kill ring
                and also in the " register.
p / P           Put (org-yank). When the register holds whole subtrees
                (linewise, starting with a headline, none higher than the
                first), they are folded (yank_folded_subtrees, unless
                that would hide the text after them) and, with
                yank_adjusted_subtrees, pasted like <prefix>hp at the
                start of the next line (p) or of this line (P). A count
                or other text: Vim's put. The cursor stays on the first
                put line (Emacs moves after the text).
<prefix>hc      Clone subtree N times (org-clone-subtree-with-time-shift),
<C-c><C-x>c     shifting its timestamps by an offset per clone (+1w,
                -2d, +3h; asked only when it has timestamps, and not
                with a count). Clones lose CLOCK lines and get a new ID, or
                none with clone_delete_id. With a repeating timestamp,
                the copies lose the repeater and one more copy after them
                keeps it.
<prefix>hs      Sort the children of the current headline, the top-level
<C-c>^          entries before the first headline, the entries of the
                Visual selection, or the list at the cursor. Entry keys:
                a alpha, n numeric (a missing number is 0), p priority,
                r property (compared as text), o TODO order (open
                keywords, then none, then done), f function, t time
                (first active timestamp, else inactive), s scheduled,
                d deadline, c created (first inactive timestamp at the
                start of a line), k clocking time; missing dates count as
                now. List keys: a, n, t, f, x (checkbox). Uppercase
                reverses; a count (C-u) makes it case-sensitive. For f,
                give a name from sort_functions or a Lua expression
                returning a function(entry, lines), then optionally a
                compare function.
<prefix>hn      Narrow to subtree: edit it in a separate buffer. :w writes
                back and <C-c>' saves and closes.
<C-c><C-x>b     The same in another window (org-tree-to-indirect-buffer);
                indirect_buffer_display picks a split (reused by the
                next one, the cursor staying in the Org buffer), the
                current window, a new tab each time or one reused tab. The
                previous one is closed unless it has changes. A count N
                takes the subtree of the ancestor at level N and keeps the
                previous one (with "dedicated-frame": in a new tab).
<prefix>nb      Narrow to the block at the cursor (org-narrow-to-block).
<prefix>ne      Narrow to the element at the cursor (org-narrow-to-element).
<Tab>           (Insert mode) On a new empty headline, cycle its level:
                child of the previous entry, then up the hierarchy, then
                back (org-cycle-level). On an empty list item, indent it
                under the previous item, then outdent it level by level,
                then back to where it started (org-cycle-item-indentation).
                So <M-CR><Tab> makes a subheading. In a table: next field.
                Elsewhere: a tab.
<prefix>*       Toggle headline (org-toggle-heading): headline → text,
<C-c>*          item → headline one level below the entry (checkboxes
                become TODO / DONE), text line → headline. In Visual mode,
                every line; with a count on text, only the first line.
<prefix>-       Toggle list item (org-toggle-item): item → text (the
<C-c>-          checkbox stays), headline → item (TODO → checkbox, tags,
                planning and properties dropped, and in Visual mode the
                text of each entry moves into its item), text → item. With
                a count, the selection becomes one item.
<C-c><C-*>      Turn the list at the cursor into a subtree
                (org-list-make-subtree).
<prefix>hC      Toggle the COMMENT keyword.
<prefix>E       Emphasize (org-emphasize): wrap the Visual selection in a
<C-c><C-x><C-f> marker, replacing one already there (a space removes it);
                without a selection, insert a pair and type between them.
<C-c>:          Toggle fixed-width markup :  (org-toggle-fixed-width) on
                the line or the Visual selection.
Motions and text objects:
]] / [[         Next / previous visible headline.
][ / []         Next / previous sibling.
g{              Parent headline.
<prefix>.       Go to a location in the buffer without changing its folds
<C-c><C-j>      (org-goto). With goto_interface = "outline" (the
                default) a read-only copy of the buffer opens in overview
                in a tab of its own:
                  <CR>           jump there
                  <Left> <Right> on a headline, jump there
                  <C-g>          back where you were (q without
                                 auto-isearch)
                  <Tab>          cycle visibility
                  <Down> <Up>    next / previous visible headline
                  /              sparse tree for a regexp
                  <C-c><C-n> <C-p> <C-f> <C-b> <C-u>  headline motions
                  typing         searches the headline text (a /
                                 search; <CR> ends it, <CR> again jumps)
                                 with goto_auto_isearch; otherwise
                                 n p f b u move and q quits.
                  <C-g> <Esc>    quit
                With "outline-path-completion": pick a headline by its
                outline path (vim.ui.select()), down to
                goto_max_level. A count uses the other interface.
gO              The headlines in the location list, indented by level,
                down to ui.imenu_depth levels (default 2; reduced
                levels with odd levels only), like gO in help and markdown
                buffers: Emacs's imenu index (org-imenu-depth). The text is
                the headline's without TODO keyword, priority, COMMENT and
                tags, links shown by their description (:Org imenu).
ih / ah         Headline section without / with the headline line.
ir / ar         Subtree without / with the headline line.
Elements
Paragraphs, lists and items, blocks, drawers, tables, fixed-width areas,
keywords and comments are elements; blank lines after one belong to it.
Commands work on whole lines: on the first line of a list item they act on
the item.
<M-}> / <M-{>   Next / previous element at the same level
                (org-forward-element / org-backward-element); on a
                headline, the next / previous sibling.
<C-c><C-^>      Up to the parent element, or the headline (org-up-element).
<C-c><C-_>      Down to the first element inside (org-down-element).
<prefix>v       Select the element (org-mark-element); again in Visual
                mode to add the next one. Emacs binds it to M-h, which is
                <M-h> (promote) here.
<C-M-t>         Swap the element with the previous one and move after both
                (org-transpose-element).
<C-c><M-f>      Next / previous #+begin_ block (org-next-block /
<C-c><M-b>      org-previous-block); a count skips blocks.
:Org beginning_of_line  Go to the start of the line (org-beginning-of-line).
                With special_ctrl_a_e, on a headline first to the start
                of its title (after the TODO keyword and priority), on an
                item after its bullet and checkbox; again to column 0.
:Org end_of_line  Go to the end of the line (org-end-of-line); with
                special_ctrl_a_e, on a headline first before its tags.
:Org kill_line  Kill to the end of the line into the " register, or the
                newline at its end (org-kill-line). On a folded headline
                that is the whole hidden subtree: ctrl_k_protect_subtree
                asks first or refuses. With special_ctrl_k, in a
                headline's title it kills up to the tags, on the tags the
                tags.
These have no default keys; for Emacs-style Insert mode keys:
mappings = { org_insert = { beginning_of_line = "<C-a>",
  end_of_line = "<C-e>", kill_line = "<C-k>" } }
Indentation and filling
'indentexpr' follows org-indent-line, so ==, = and new lines (o, O)
are indented like in Emacs: headlines, footnote definitions and diary sexps
at column 0; the first line of an element like its previous sibling, else
like the contents of its parent (after the bullet of an item; at the
headline level + 1 with adapt_indentation); other lines like the line
above. List items keep their indentation (move them with <M-h> / <M-l>),
and = keeps the contents of example, export and verse blocks. Lines of a
src block keep their relative indentation at the block's content
indentation (Emacs asks the language's major mode). <Tab> in body text
indents the same way (cycle_emulate_tab).
:Org indent_region  Indent the Visual selection, or the buffer, like
                org-indent-region: lists, example and export blocks move
                as a whole, node properties are aligned
                (property_format).
:Org indent_block   Indent the block at the cursor (on its #+begin line;
                org-indent-block).
:Org indent_drawer  Indent the drawer at the cursor (on its first line;
                org-indent-drawer).
:Org unindent_buffer  Remove the common indentation of every element of
                every section, keeping relative indentation
                (org-unindent-buffer).
'formatexpr' follows org-fill-paragraph, so gq and gw fill paragraphs
(also in items, drawers, quote blocks and footnote definitions), comments
and the text of comment blocks, and realign tables. Headlines, keywords,
planning lines, drawers' markers and other blocks are left alone. Lines are
filled to 'textwidth' (79 when it is 0; Emacs uses fill-column); items
continue at their body column; a sentence end at the end of a joined line
gets two spaces, and lines are not broken after a period followed by one
space, before text that would start a new element (a bullet, #, |,
...), after \\ or inside a timestamp. \\ line breaks are kept. On a
blank line, gqq fills the element after it. Typing past 'textwidth'
(formatoptions t) never wraps headlines, keywords, tables or blocks.

Inline tasks (the org-inlinetask module, off like in Emacs): with inlinetask_min_level = 15, headlines of that level or deeper are TODO items inside the text of an entry, optionally closed by an END line:

* Entry
*************** TODO Call Bob
Details.
*************** END
They are not entries of their own (the text around them belongs to the
entry), fold up to END with <Tab>, promote / demote together with their END
line (never below the minimum level) and show only their last two stars
(also the first one, as a marker, with inlinetask_show_first_star,
org-inlinetask-show-first-star).
<C-c><C-x>t     Insert an inline task (inlinetask_default_state as its
                keyword unless a count is given), around the Visual
                selection if any.

Speed commands (org-use-speed-commands, off by default): with use_speed_commands = true, a letter typed in Insert mode at the very start of a headline (before the stars) runs a command instead of being inserted: n p f b u next / previous / next sibling / previous sibling / parent headline, F B next / previous block, j go to heading, g refile goto, c C cycle / global cycle, SPC outline path, s narrow, k cut subtree, = column view, U D move subtree, r l R L demote / promote (subtree), i insert heading, ^ sort, w refile, a archive, @ select subtree, # COMMENT, I O clock in / out, t TODO, , priority (0 remove, 1 2 3 highest, default, lowest), : tags, e E effort, W APPT_WARNTIME, v agenda, / sparse tree, o open link, < > agenda restriction lock, ? help. speed_commands adds or changes keys: { x = "archive_subtree", n = false }. At the very start of a #+begin_src line the letters of the Babel keys (<C-c><C-v> x) run their command too (org-babel-speed-command-activate): p n e o v u g r b s d t f c j l i I z a h x k. speed_command_hook (org-speed-command-hook) lists the functions deciding what a key runs, tried in order: the names "org-speed-command-activate" and "org-babel-speed-command-activate" for the built-in ones, or functions of the key returning an action name, a function or nil. use_speed_commands may also be a function deciding where they apply.