-
-
Notifications
You must be signed in to change notification settings - Fork 7
12.Plug Mappings
Every markdown-plus action is exposed as a <Plug> mapping. There are 110 of them, listed below with the modes they support and the default key they are bound to (if any).
Most <Plug> mappings are global and registered once setup() has run, even when keymaps.enabled = false. Their default keys are buffer-local and only installed in Markdown buffers.
The five TOC Window mappings are the exception. They are registered the first time a TOC window is opened, and their defaults are forced into that window's buffer — so they are installed even when keymaps.enabled = false.
-- Rebind anything you like
vim.keymap.set("n", "<leader>b", "<Plug>(MarkdownPlusBold)")Note
Mappings with no default key are opt-in — bind them yourself if you want them.
See Customizing Keymaps for how defaults interact with your existing mappings.
- List Management (20)
- Text Formatting (8)
- Code Blocks (6)
- Headers & TOC (15)
- TOC Window (5)
- Thematic Breaks (2)
- Links (7)
- Images (4)
- Quotes (1)
- Callouts (4)
- Tables (30)
- Footnotes (8)
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusDebugLists) |
n |
<localleader>md |
Debug list groups |
<Plug>(MarkdownPlusListBackspace) |
i |
<BS> |
Smart backspace (remove empty list) |
<Plug>(MarkdownPlusListEnter) |
i |
<CR> |
Auto-continue list or split content |
<Plug>(MarkdownPlusListIndent) |
i |
<Tab> |
Indent list item |
<Plug>(MarkdownPlusListOutdent) |
i |
<S-Tab> |
Outdent list item |
<Plug>(MarkdownPlusListShiftEnter) |
i |
<A-CR> |
Continue list content on next line |
<Plug>(MarkdownPlusNewListItemAbove) |
n |
O |
New list item above |
<Plug>(MarkdownPlusNewListItemBelow) |
n |
o |
New list item below |
<Plug>(MarkdownPlusRenumberLists) |
n |
<localleader>mr |
Renumber ordered lists |
<Plug>(MarkdownPlusToggleCheckbox) |
n, i, v, x |
<localleader>mx, <C-t>
|
Toggle checkbox |
<Plug>(MarkdownPlusToggleListClear) |
n, v, x |
<localleader>ltc |
Clear list markers (plain text) |
<Plug>(MarkdownPlusToggleListLetterLower) |
n, v, x |
<localleader>ltl |
Toggle lowercase letter list |
<Plug>(MarkdownPlusToggleListLetterLowerParen) |
n, v, x |
<localleader>ltp |
Toggle parenthesized lowercase letter list |
<Plug>(MarkdownPlusToggleListLetterUpper) |
n, v, x |
<localleader>ltL |
Toggle uppercase letter list |
<Plug>(MarkdownPlusToggleListLetterUpperParen) |
n, v, x |
<localleader>ltP |
Toggle parenthesized uppercase letter list |
<Plug>(MarkdownPlusToggleListOrdered) |
n, v, x |
<localleader>ltn |
Toggle ordered list |
<Plug>(MarkdownPlusToggleListOrderedParen) |
n, v, x |
<localleader>ltN |
Toggle parenthesized ordered list |
<Plug>(MarkdownPlusToggleListPick) |
n, v, x |
— | Toggle list (pick type: u/t/n/N/l/L/p/P, c=clear) |
<Plug>(MarkdownPlusToggleListTask) |
n, v, x |
<localleader>ltt |
Toggle task list |
<Plug>(MarkdownPlusToggleListUnordered) |
n, v, x |
<localleader>ltu |
Toggle unordered list |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusBold) |
n, v, x |
<localleader>mb |
Toggle bold formatting |
<Plug>(MarkdownPlusClearFormatting) |
n, v, x |
<localleader>mF |
Clear all formatting |
<Plug>(MarkdownPlusCode) |
n, v, x |
`m`` | Toggle inline code formatting |
<Plug>(MarkdownPlusEscapeSelection) |
v, x |
<localleader>me |
Escape/unescape markdown punctuation in selection |
<Plug>(MarkdownPlusHighlight) |
n, v, x |
<localleader>m= |
Toggle highlight formatting |
<Plug>(MarkdownPlusItalic) |
n, v, x |
<localleader>mi |
Toggle italic formatting |
<Plug>(MarkdownPlusStrikethrough) |
n, v, x |
<localleader>mS |
Toggle strikethrough formatting |
<Plug>(MarkdownPlusUnderline) |
n, v, x |
<localleader>mu |
Toggle underline formatting |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusCodeBlock) |
v, x |
<localleader>mw |
Convert selection to code block |
<Plug>(MarkdownPlusCodeBlockChangeLanguage) |
n |
<localleader>mC |
Change language of fenced code block |
<Plug>(MarkdownPlusCodeBlockInsert) |
n, v, x |
<localleader>mc |
Insert/wrap fenced code block with language |
<Plug>(MarkdownPlusCodeBlockNext) |
n |
]b |
Jump to next fenced code block |
<Plug>(MarkdownPlusCodeBlockPrev) |
n |
[b |
Jump to previous fenced code block |
<Plug>(MarkdownPlusCodeBlockToggleFence) |
n |
— | Toggle code block fence style |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusDemoteHeader) |
n |
<localleader>h- |
Demote header (decrease level) |
<Plug>(MarkdownPlusFollowLink) |
n |
gd |
Follow TOC link to header |
<Plug>(MarkdownPlusGenerateTOC) |
n |
<localleader>ht |
Generate table of contents |
<Plug>(MarkdownPlusHeader1) |
n |
<localleader>h1 |
Set/convert to H1 |
<Plug>(MarkdownPlusHeader2) |
n |
<localleader>h2 |
Set/convert to H2 |
<Plug>(MarkdownPlusHeader3) |
n |
<localleader>h3 |
Set/convert to H3 |
<Plug>(MarkdownPlusHeader4) |
n |
<localleader>h4 |
Set/convert to H4 |
<Plug>(MarkdownPlusHeader5) |
n |
<localleader>h5 |
Set/convert to H5 |
<Plug>(MarkdownPlusHeader6) |
n |
<localleader>h6 |
Set/convert to H6 |
<Plug>(MarkdownPlusNextHeader) |
n |
]] † |
Jump to next header |
<Plug>(MarkdownPlusOpenTocWindow) |
n |
<localleader>hT |
Open navigable TOC window |
<Plug>(MarkdownPlusPrevHeader) |
n |
[[ † |
Jump to previous header |
<Plug>(MarkdownPlusPromoteHeader) |
n |
<localleader>h+ |
Promote header (increase level) |
<Plug>(MarkdownPlusToggleAtxSetext) |
n |
<localleader>ms |
Toggle heading between ATX and setext style |
<Plug>(MarkdownPlusUpdateTOC) |
n |
<localleader>hu |
Update table of contents |
These act on the navigable TOC window opened by <localleader>hT. Unlike every other
mapping on this page, they are registered lazily — the first time a TOC window opens —
and their defaults are buffer-local to that window and forced, so they work even when
keymaps.enabled = false.
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusTocClose) |
n |
q |
Close TOC |
<Plug>(MarkdownPlusTocCollapse) |
n |
h |
Collapse header |
<Plug>(MarkdownPlusTocExpand) |
n |
l |
Expand header |
<Plug>(MarkdownPlusTocHelp) |
n |
? |
Show help |
<Plug>(MarkdownPlusTocJump) |
n |
<CR> |
Jump to header |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusCycleThematicBreak) |
n |
<localleader>mH |
Cycle thematic break style |
<Plug>(MarkdownPlusInsertThematicBreak) |
n |
<localleader>mh |
Insert thematic break below cursor |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusAutoLinkURL) |
n |
<localleader>ma |
Convert URL to markdown link |
<Plug>(MarkdownPlusConvertToInline) |
n |
<localleader>mI |
Convert to inline link |
<Plug>(MarkdownPlusConvertToReference) |
n |
<localleader>mR |
Convert to reference-style link |
<Plug>(MarkdownPlusEditLink) |
n |
<localleader>me |
Edit link under cursor |
<Plug>(MarkdownPlusInsertLink) |
n |
<localleader>ml |
Insert markdown link |
<Plug>(MarkdownPlusSelectionToLink) |
v, x, s |
<localleader>ml |
Convert selection to link |
<Plug>(MarkdownPlusSmartPaste) |
n |
<localleader>mp |
Smart paste URL from clipboard as markdown link |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusEditImage) |
n |
<localleader>mE |
Edit image under cursor |
<Plug>(MarkdownPlusInsertImage) |
n |
<localleader>mL |
Insert markdown image |
<Plug>(MarkdownPlusSelectionToImage) |
v, x, s |
<localleader>mL |
Convert selection to image |
<Plug>(MarkdownPlusToggleImageLink) |
n |
<localleader>mA |
Toggle between link and image |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusToggleQuote) |
n, v, x |
<localleader>mq |
Toggle blockquote |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusConvertToBlockquote) |
n |
<localleader>mQb |
Convert callout to blockquote |
<Plug>(MarkdownPlusConvertToCallout) |
n |
<localleader>mQc |
Convert blockquote to callout |
<Plug>(MarkdownPlusInsertCallout) |
n, v, x |
<localleader>mQi |
Insert/wrap callout |
<Plug>(MarkdownPlusToggleCalloutType) |
n |
<localleader>mQt |
Toggle callout type |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusTableClearCell) |
n |
<localleader>tx |
Clear cell content |
<Plug>(MarkdownPlusTableCreate) |
n |
<localleader>tc |
Create new table |
<Plug>(MarkdownPlusTableDeleteColumn) |
n |
<localleader>tdc |
Delete column |
<Plug>(MarkdownPlusTableDeleteRow) |
n |
<localleader>tdr |
Delete row |
<Plug>(MarkdownPlusTableDuplicateColumn) |
n |
<localleader>tyc |
Duplicate column |
<Plug>(MarkdownPlusTableDuplicateRow) |
n |
<localleader>tyr |
Duplicate row |
<Plug>(MarkdownPlusTableEditCell) |
n |
<localleader>te |
Edit cell content in a floating popup |
<Plug>(MarkdownPlusTableFormat) |
n |
<localleader>tf |
Format table |
<Plug>(MarkdownPlusTableFromCSV) |
n |
<localleader>tvi |
Convert CSV to table |
<Plug>(MarkdownPlusTableInsertBreak) |
n |
<localleader>tb |
Insert line break at cursor inside cell |
<Plug>(MarkdownPlusTableInsertColumnLeft) |
n |
<localleader>tiC |
Insert column left |
<Plug>(MarkdownPlusTableInsertColumnRight) |
n |
<localleader>tic |
Insert column right |
<Plug>(MarkdownPlusTableInsertRowAbove) |
n |
<localleader>tiR |
Insert row above |
<Plug>(MarkdownPlusTableInsertRowBelow) |
n |
<localleader>tir |
Insert row below |
<Plug>(MarkdownPlusTableMoveColumnLeft) |
n |
<localleader>tmh |
Move column left |
<Plug>(MarkdownPlusTableMoveColumnRight) |
n |
<localleader>tml |
Move column right |
<Plug>(MarkdownPlusTableMoveRowDown) |
n |
<localleader>tmj |
Move row down |
<Plug>(MarkdownPlusTableMoveRowUp) |
n |
<localleader>tmk |
Move row up |
<Plug>(MarkdownPlusTableNavDown) |
i |
<A-j> |
Navigate to cell below or move cursor down |
<Plug>(MarkdownPlusTableNavLeft) |
i |
<A-h> |
Navigate to cell left or move cursor left |
<Plug>(MarkdownPlusTableNavRight) |
i |
<A-l> |
Navigate to cell right or move cursor right |
<Plug>(MarkdownPlusTableNavUp) |
i |
<A-k> |
Navigate to cell above or move cursor up |
<Plug>(MarkdownPlusTableNormalize) |
n |
<localleader>tn |
Normalize table |
<Plug>(MarkdownPlusTableSortAscending) |
n |
<localleader>tsa |
Sort table by column (ascending) |
<Plug>(MarkdownPlusTableSortDescending) |
n |
<localleader>tsd |
Sort table by column (descending) |
<Plug>(MarkdownPlusTableToCSV) |
n |
<localleader>tvx |
Convert table to CSV |
<Plug>(MarkdownPlusTableToggleCellAlignment) |
n |
<localleader>ta |
Toggle cell alignment (left/center/right) |
<Plug>(MarkdownPlusTableTranspose) |
n |
<localleader>tt |
Transpose table (swap rows/columns) |
<Plug>(MarkdownPlusTableUnwrapCell) |
n |
<localleader>tW |
Unwrap cell (strip every variant) |
<Plug>(MarkdownPlusTableWrapCell) |
n |
<localleader>tw |
Wrap cell content at word boundaries using |
<Plug> mapping |
Modes | Default key | Description |
|---|---|---|---|
<Plug>(MarkdownPlusFootnoteDelete) |
n |
<localleader>mfd |
Delete footnote |
<Plug>(MarkdownPlusFootnoteEdit) |
n |
<localleader>mfe |
Edit footnote |
<Plug>(MarkdownPlusFootnoteGotoDefinition) |
n |
<localleader>mfg |
Go to footnote definition |
<Plug>(MarkdownPlusFootnoteGotoReference) |
n |
<localleader>mfr |
Go to footnote reference |
<Plug>(MarkdownPlusFootnoteInsert) |
n |
<localleader>mfi |
Insert footnote |
<Plug>(MarkdownPlusFootnoteList) |
n |
<localleader>mfl |
List footnotes |
<Plug>(MarkdownPlusFootnoteNext) |
n |
<localleader>mfn |
Next footnote |
<Plug>(MarkdownPlusFootnotePrev) |
n |
<localleader>mfp |
Previous footnote |
† On recent Neovim versions this key is already mapped by the built-in markdown ftplugin ($VIMRUNTIME/ftplugin/markdown.lua maps ]] and [[ to section motions). markdown-plus never shadows an existing mapping, so it preserves that one and its own default is not installed. Bind the <Plug> mapping yourself if you want markdown-plus to own the key.
- Keymaps Reference — the defaults, grouped by task
- Customizing Keymaps — disabling, remapping and plugin interop
- Lua API — call the same actions from Lua
:help markdown-plus-plug-mappings