org.nvim

Keymaps reference

Every mapping is mappings.<section>.<action> = lhs | { lhs, ... } | false. <prefix> expands to mappings.prefix. mappings.disable_all = true turns off every mapping.

mappings = {
  prefix = "<localleader>",
  org = { toggle_checkbox = "<leader>x", open_at_point = "gx" },
  agenda = { later = "L", earlier = "H" },
}

Section global: agenda, capture, store_link, goto_heading, clock_goto, clock_out, clock_cancel.

Repeating with . The editing keys below can be repeated with . like Vim's own changes: after >> on a headline, j. demotes the next one too. "." keeps the count of the first key (2>> then . demotes by two again); a count before "." replaces it (3.). Each repeat is its own undo step. "." does what pressing the key again would, on the cursor's line, also inside a closed fold, and the cursor stays where the key left it. When the key doesn't apply where "." is pressed, the key's Vim default runs, as when typing it. Only Normal-mode keys are repeated, and only edits that ask nothing: promote / demote (<< >> <s >s, the meta and shift-meta keys), move_subtree_up / down, the TODO, priority and date shift keys (cit ciT, <S-Left> <S-Right> <S-Up> <S-Down>, <C-a> <C-x>, the <C-S-Left> / <C-S-Right> keyword sets), toggle_checkbox, cycle_bullet, toggle_heading, toggle_item, toggle_comment, toggle_archive_tag, <C-c>* and <C-c>-, the element drags and transpose, toggle_fixed_width, toggle_radio_button, toggle_ordered, toggle_timestamp_type, reset_checkbox_state_subtree, the CLOCK shifts (<C-S-Up> / <C-S-Down>), inc_effort, babel_remove_result and the table row, column, hline and blank-field keys. Keys that prompt (set_tags, schedule, priority, ...) or insert text (insert_heading, ...) are not repeated; Emacs's own C-x z repeat is not bound. An operator with an org text object (org-textobj) is a Vim change, so "." repeats it too.

A count on a key whose Emacs command takes a prefix argument keeps the Emacs meaning (4cit, 4<C-Space>, ...). On the keys whose Emacs command takes none, a count repeats the edit, as one undo step: promote / demote of a list item (3>>, <M-h> <M-l> <M-H> <M-L>), moving a list item, table row or element (<M-k> <M-j>) and moving a table column (<M-h> <M-l>). Promote / demote and moving a subtree already take a count. A count past what can be done stops there (an item at the margin, a row at the table's end).

Section org (default key: action):

g?help
<Tab>cycle
<S-Tab>global_cycle
<C-c><C-c>, <prefix><CR>context_action
<CR>, gx, <prefix>oopen_at_point
<M-CR>meta_return
<M-S-CR>meta_shift_return
<prefix>ihinsert_heading
<prefix>itinsert_todo_heading
<prefix>isinsert_subheading
<prefix>idinsert_drawer
<prefix>ibinsert_structure_template
<prefix>ifinsert_footnote
<prefix>i@cite_insert
<<promote_heading
>>demote_heading
<spromote_subtree
>sdemote_subtree
=indent_operator (org-indent-region, org-indent)
<M-h> <M-l> <M-k> <M-j>meta_left/right/up/down
<M-Left> <M-Right>meta_left/right (in addition to <M-h>/<M-l>)
<M-Up> <M-Down>meta_up/down (in addition to <M-k>/<M-j>)
<M-H> <M-L> <M-K> <M-J>shift_meta_left/right/up/down
<prefix>K / Jmove_subtree_up / move_subtree_down
<prefix>hy hd hp hccopy/cut/paste/clone_subtree
<prefix>hssort
<prefix>hnnarrow_subtree
<prefix>hCtoggle_comment
<prefix>hAtoggle_archive_tag
<prefix>*toggle_heading
<prefix>-toggle_item
<prefix>Eemphasize
<prefix>hbcycle_bullet
<prefix>vmark_element
<prefix>nb / nenarrow_block / element
g{goto_parent
]] [[next/prev_heading
][ []next/prev_sibling
<prefix>.buffer_goto
cit / ciTtodo_next / todo_prev
<prefix>Stodo_select
<S-Right>/<S-Left>shift_right/shift_left
<S-Up>/<S-Down>shift_up/shift_down
<C-a>/<C-x>increment/decrement
<prefix>,priority
<prefix>tset_tags
<prefix>p / Pset/delete_property
<prefix>lIid_get_create
<prefix>s / dschedule / deadline
<prefix>i. / i!timestamp / timestamp_inactive
<C-Space>toggle_checkbox
<prefix>#update_statistics
<prefix>xi xo xq xj xeclock_in/out/cancel/goto, set_effort
<prefix>xE xm xzinc_effort, clock_modify_effort, clock_resolve
<prefix>xr xd xu xUclock_report, clock_display, dblock_update(_all)
<prefix>xv xV xllink_preview, link_preview_refresh, latex_preview
<prefix>Ccolumn_view
<prefix>li ls lt ln lpinsert/store_link, toggle_link_display, next/prev_link
<prefix>lL lAinsert_last_stored_link / insert_all_links
<prefix>lg lyid_goto / id_copy
<prefix>rrefile
<prefix>$archive_subtree
<prefix>Aattach
<prefix>Rrefile_copy
<prefix>/sparse_tree
<prefix>eexport
<prefix>Tc T- Tf Ts Tr TR Ti TItable_create, table_insert_hline, table_recalc, table_sort, table_insert/delete_row, table_insert/delete_column
<prefix>Tt T#table_transpose, table_rotate_marks
<S-CR>table_copy_down
<prefix>'edit_special
<prefix>be bb bs bt bk bn bpbabel_execute(_buffer/_subtree), babel_tangle, babel_remove_result, babel_next/prev_block
<prefix>bf bv bI bc bjbabel_tangle_file, babel_expand, babel_view_info, babel_check, babel_insert_header_arg
<prefix>bg br bu bo bd bibabel_goto_named(_result), babel_goto_head, babel_open_result, babel_demarcate, babel_lob_ingest
<prefix>bl bz bZ bKbabel_load_in_session, babel_switch_to_session(_with_code), babel_kill_session
<prefix>bCbabel_cancel
<prefix>ba bh bm bxbabel_sha1_hash, babel_describe_bindings, babel_mark_block, babel_do_key_sequence

Section org_insert: meta_return <M-CR>, insert_tab <Tab> (table: next field; empty headline or item: cycle its level), table_prev_field <S-Tab>, table_next_row <CR>, table_copy_down <S-CR>. The table_next_field action is still available.

Sections emacs, emacs_insert and emacs_global add Emacs Org's own keys (org-mode-map) on top of the Vim-style keys, so muscle memory from Emacs works unchanged. Set a section to false to turn it off:

mappings = { emacs = false, emacs_insert = false, emacs_global = false }

C-c prefixed keys are normal-mode only (in Insert mode <C-c> still leaves Insert mode). Keys marked (ctx) depend on the cursor, like in Emacs. A count stands in for C-u (e.g. 4<C-c>. is C-u C-c .).

With which-key.nvim, the C-c C-x, C-c C-v and C-c " groups are labelled ("org C-x ...", "org babel (C-v)", "org plot"). which-key lists them after the keys directly under C-c, below the end of its popup, and its default scroll keys <C-d> and <C-u> are org's own C-c C-d (deadline) and C-c C-u (parent heading). To scroll that popup, give which-key other keys:

require("which-key").setup({
  keys = { scroll_down = "<PageDown>", scroll_up = "<PageUp>" },
})

Global (emacs_global):

<C-c>aagenda
<C-c>ccapture
<C-c>lstore_link

Structure and visibility:

<C-CR>insert_heading (after the subtree; also Insert mode)
<C-S-CR>insert_todo_heading (also Insert mode)
<C-c><CR>(ctx) table: hline and move; else insert heading
<C-c>*(ctx) table: recalculate the row (count 4: the table, 16: iterate); else toggle heading
<C-c>-(ctx) table: hline; item: cycle bullet; else toggle item
<C-c>^(ctx) sort table column / entries / list items
<C-c>;toggle COMMENT
<C-c>@mark (select) subtree
<C-c><C-,>structure template
<C-c><C-x>dinsert drawer
<C-c><C-x>ffootnote
<C-c><C-x><C-f>emphasize
<C-c><C-x>@citation (cite_insert)
<LeftRelease>citation key
<C-c>:fixed-width
<C-c><C-*>list to subtree
<C-c><C-x><C-r>radio button
<C-c><C-x>tinline task
<C-c><C-x>\pretty entities
<C-M-t>transpose elements
<M-}> <M-{>next / previous element
<C-c><C-^> <C-c><C-_>up / down element
<C-c><M-f> <C-c><M-b>next / previous block
<C-c><C-x>cclone subtree
<C-c><C-x>bsubtree in a split
<C-c><C-x><M-w>(ctx) copy table region / subtree
<C-c><C-x><C-w>(ctx) cut table region / subtree
<C-c><C-x><C-y>(ctx) paste table rectangle / subtree
<C-c><C-k>show branches
<C-c><Tab>show children; (ctx) in a table: shrink / expand the column
<C-c><C-Tab>cycle even an archived subtree
<C-c><C-r>reveal context
<C-c><C-x>vcopy visible text
<C-c><C-n> <C-p>next / previous heading
<C-c><C-f> <C-b>next / previous sibling
<C-c><C-u>parent heading
<C-c><C-j>go to heading

TODO, tags, properties:

<C-c><C-t>change TODO state (fast selection, or cycle when the keywords have no keys; count 4: note, 16: next set, 64: ignore blocking, N: the Nth keyword; Visual: every headline)
<C-S-Right> <C-S-Left>next / previous TODO keyword set
<C-c>,priority
<C-c><C-q>tags
<C-c><C-x>pproperty
<C-c><C-x>Pproperty and value
<C-c><C-x>qtoggle tag groups
<C-c><C-x>otoggle ORDERED
<C-c><C-z>add note
<C-c>#update statistics cookies
<C-c><C-x><C-b>toggle checkbox

Dates:

<C-c><C-s> <C-c><C-d>schedule / deadline (count 4: remove; count 16: delay / warning period; Visual: every headline)
<C-c><C-x><C-t>toggle the custom timestamp display
<C-c>. <C-c>!active / inactive timestamp (count: with time; count 16: now, no prompt)
<C-c><insert today
<C-c>>open calendar
<C-c><C-y>evaluate time range (count: insert 2d 03:30)

Clock, effort, dynamic blocks, timers:

<C-c><C-x><C-i>, <C-c><C-x><Tab>clock in
<C-c><C-x><C-x>clock in last task
<C-c><C-x><C-o>clock out
<C-c><C-x><C-q>cancel clock
<C-c><C-x><C-j>go to clock
<C-c><C-x><C-d>clock sums (clock report: <prefix>xr, or <C-c><C-x>x; <C-c><C-x><C-r> is the radio button, as in Emacs)
<C-c><C-x>eeffort
<C-c><C-x>Enext allowed effort
<C-c><C-x><C-e>change clocked effort
<C-c><C-x><C-z>resolve clocks
<C-S-Up> <C-S-Down>shift CLOCK line timestamps
<C-c><C-x><C-v>image previews
<C-c><C-x><C-M-v>refresh them
<C-c><C-x><C-l>LaTeX previews
<C-c><C-x><C-u>update dblock
<C-c><C-x><C-c>column view
<C-c><C-x>icolumnview block
<C-c><C-x>xinsert dynamic block
<C-c><C-x>0 _ ,timer start / stop / pause-continue
<C-c><C-x>. - ;insert timer / timer item / countdown
<C-c><C-x>g Gupdate all feeds / go to a feed inbox (org-feed)

Links, refile, archive, export:

<C-c><C-l>insert link
<C-c><C-o>open at point (on a headline: the entry's links)
<C-c><M-l>insert last stored link
<C-c><C-M-l>insert all links
<C-c>&jump back from a followed link
<C-c><C-x><C-n> <C-p>next / previous link
<C-c><C-w>refile
<C-c>$, <C-c><C-x><C-s>archive
<C-c><C-x><C-a>archive with archive_default_command
<C-c><M-w>copy to a refile target
<C-c><C-M-w>refile with refile.reverse_note_order inverted
<C-c><C-x>aARCHIVE tag
<C-c><C-a>attachments
<C-c><C-x>Aarchive to the Archive sibling
<C-c>[ <C-c>]add / remove file from agenda files (saved)
<C-'> <C-,>next agenda file
<C-c><C-x>< >set / remove agenda lock
<C-c>/sparse tree
<C-c><C-e>export
<C-c>'edit special
<C-c>\tags / property match sparse tree

Tables:

<C-c>|create / convert region
<C-c>=column formula (count: field formula)
<C-c>`edit field (count 4: show shrunk column, 16: follow)
<C-c>+sum column / selection
<C-c>}toggle @row/$col overlays
<C-c><Space>blank field(s)
<C-c>{formula debugger
<C-c>?field info
<C-#>rotate recalculation mark
<C-c>"a <C-c>"gASCII / gnuplot plot
<C-c>~convert to / from table.el, or insert a table.el table

Actions without default keys: table_recalculate, table_iterate, table_recalc_buffer, table_toggle_column_width, table_shrink, table_expand, table_edit_formulas, table_follow_field_mode, table_header_line_mode, orgtbl_mode, orgtbl_insert_radio_table, orgtbl_send_table, orgtbl_toggle_comment (also outside org buffers).

Babel (C-c C-v, each also with the Ctrl form, e.g. <C-c><C-v><C-e>):

eexecute
bbuffer
ssubtree
ttangle
kremove result
n / pnext / previous block
ftangle a file
vexpand block
Iblock info
ccheck header args
jinsert header arg
ggo to named block
rgo to named result
ugo to block head
oopen result
dsplit / wrap block
iingest into Library of Babel
lload block into session
<C-z>show session
zsession + edit buffer
ablock hash
hlist bindings
xrun keys in edit buffer
<C-M-h>select block body

Section text_objects (org-textobj): inner_heading ih, around_heading ah, inner_subtree ir, around_subtree ar, inner_element ie, around_element ae, inner_item i-, around_item a-, inner_cell ic, around_cell ac, inner_row iR, around_row aR, inner_column iC, around_column aC, inner_link iL, around_link aL, inner_timestamp id, around_timestamp ad. Section agenda: see org-agenda. Section capture: finalize, kill, refile. Section edit_src: save_exit, abort, send_to_session (<C-c><C-c>, <prefix>e: blocks with a :session, org-babel-edit-special). Section beamer: beamer_select_environment <C-c><C-b>, only while org-beamer-mode is on.