Repository navigation
Add keyboard shortcuts to step over Markdown formatting markers #490
Description
- Date: 2026-07-26
- Type: Enhancement
- Priority: Low
Problem
Keyboard shortcuts such as Ctrl+B, Ctrl+I, and similar formatting shortcuts automatically insert Markdown formatting markers and place the cursor between them, making it quick to begin typing formatted text.
However, once the user has finished typing, moving the cursor outside the formatting markers requires additional cursor movement before they can continue writing. This interrupts an otherwise smooth keyboard-driven editing workflow.
Proposed enhancement
Provide keyboard shortcuts for navigating across Markdown formatting markers when the cursor is inside a formatted region.
Example
-
Ctrl+Lmoves the cursor to the first position immediately after the closing formatting markers.Before
**This|**
After
**This**|
-
Ctrl+Hmoves the cursor to the first position immediately before the opening markers.Before
**That|**
After
|**That**
-
When the cursor is immediately before the opening formatting markers, pressing
Ctrl+Lonce moves the cursor inside the formatted region. PressingCtrl+Lagain moves the cursor to the first position immediately after the closing formatting markers.Before
|**This**
After pressing
Ctrl+Lonce**|This**
After pressing
Ctrl+Lthe second time**This**|
-
When the cursor is immediately after the closing formatting markers, pressing
Ctrl+Hmoves the cursor inside the formatted region. PressingCtrl+Hagain moves the cursor to the first position immediately before the opening formatting markers.Before
**This**|
After pressing
Ctrl+Honce**This|**
After pressing
Ctrl+Hthe second time|**This**
Why this would help
- Improves keyboard-driven editing.
- Reduces unnecessary cursor movement.
- Makes working with Markdown formatting faster and more efficient.
- Provides a smoother writing experience for users who frequently use formatting shortcuts.
Current workaround
Users must manually move the cursor out of the formatting markers using the arrow keys, the mouse, or editor-specific navigation commands (such as Vim motions). These approaches require multiple keystrokes or mode changes, interrupting an otherwise smooth keyboard-driven editing workflow.
Additional context
This behaviour would be especially useful for users who frequently write in Markdown using keyboard shortcuts, allowing them to navigate across formatting boundaries without interrupting their typing flow.
If implemented, the same concept could potentially be extended to other paired characters such as (), [], and {} for consistent cursor navigation across paired delimiters.
Activity
Feat(editor): hop the cursor across inline markers (#490)
adibhanna commentedon Jul 27, 2026
Built — it ships in 2.19.0. Thanks @uNyanda, this was a good catch about where the cursor is left stranded.
Alt+] moves the cursor to the far side of the next run of markers on the line; Alt+[ to the near side of the previous one. That gives all four moves you specified:
A "run" is consecutive identical marker characters, so
**is crossed whole. That also answers your extension idea about(),[],{}— they're included, and because](is two runs rather than one,[text](url)walks in three useful steps: out of the link text, into the URL, out of the link. The full set is**,*,~~,==, backticks,$and the three bracket pairs._is deliberately not in the set. It's a valid emphasis marker, butsnake_casewords are common enough in notes that including it would stop the cursor in the middle of ordinary text. Say the word if you'd rather have it and I'll make it a setting.On Ctrl+L / Ctrl+H: I didn't use them as the defaults, because both are already taken exactly where you'd press them —
Mod+Lis CodeMirror's select-line on Linux and Windows (you're on Linux, soCtrl+Lwould be shadowing it), andCtrl+His delete-backward on macOS and in Vim insert mode. The defaults are Alt+] and Alt+[, bracket keys as a delimiter mnemonic. Both are proper keymap entries (editor.hopMarkerForward/editor.hopMarkerBackward), so if you want your original proposal, Settings → Keymaps will takeCtrl+L/Ctrl+H— and it'll warn you about any conflict. They're also settable inconfig.tomlunder[keymap].Two details worth knowing:
Works in Vim mode and out of it — I verified all three states by driving the packaged app: non-Vim, Vim insert, and Vim normal. In each,
Mod+BboldAlt+]omegawritesAlpha **bold** omega, andAlt+[walks back out to the front of the pair.Related, from the same release: pressing the formatting shortcut a second time now also steps out of the span (#443, by @junereycasuga), so
Mod+BboldMod+Bgets you out of bold specifically. The new hops are the general motion — any marker, either direction, regardless of which format you're in.Feat(editor): the marker hop steps over auto-paired quotes (#685)