Bring modal editing and Vim/Neovim power straight into the Anki Note Editor. This add-on implements a fast, responsive Python-to-JavaScript bridge to handle structural DOM manipulations natively within Anki's fields.
No more clicking around to edit your cardsβkeep your hands on the home row!
π οΈ Supported Vim Commands & Keybindings
Below is the list of keybindings currently parsed and supported by the internal engine:
1. Basic Motions (Movement)
Move around your text fields efficiently:
h / j / k / l β Left, Down, Up, Right
w / b / e β Word forward, Word backward, End of word (case-sensitive variants: W, B, E)
0 / ^ / $ β Start of line, First non-blank character, End of line
G β Go to end of field
H / M / L β Home, Middle, Last lines visible
( / ) β Sentences backward / forward
{ / } β Paragraphs backward / forward
% β Jump to matching bracket or HTML tag
+ / - β Next line / Previous line
2. Standalone & Editing Actions
x / X β Delete character under / before cursor
p / P β Paste register text after / before cursor *(no support yet) *
u β Undo (no support yet)
Ctrl-R β Redo (parcial support)
. β Repeat last change
~ β Toggle character case
J β Join lines
3. Text Objects & Modifiers
Combine operators with i (inner) or a (around) to modify chunks of text:
- Words:
w, W
- Sentences & Paragraphs:
s, p (not implemented yet)
- Blocks & Brackets:
b, B, (, ), {, }, [, ], <, > (parcially implemented)
4. Operators
c β Change
d β Delete (Partial support)
y β Yank (Copy) (no support yet)
> / < / = β Indent, Unindent, Auto-format (not yet fully implemented)
5. Entering Insert Mode
i / I β Insert at cursor / Start of line
a / A β Append after cursor / End of line
o / O β Open new line below / above
c / C β Change selection / Change to end of line
s / S β Substitute character / Substitute entire line (Not yet implemented)
β οΈ Important: Current Work in Progress & Limitations
Please keep in mind that this add-on is under active development. The parser structures are in place, but some complex Vim features are only partially / not implemented, this is intentional:
- Yank, Delete & Paste (
y, d, p): Basic register storage no not work yet.
- Visual Mode (
v, V): Selection blocks are experimental for now and not fully integrated.
- Command Mode (
:, /, ?): Command-line entry is NOT existing yet.
- HTML Tag Edge Cases: Due to how Anki structures rich text internally, there are known edge cases when using text objects inside HTML list elements (
<ul> and <li>).
π New to Vim?
If you are unfamiliar with what these individual keys do or want to learn the shortcuts, check out this excellent reference tool:
π Vim Cheat Sheet
π» Open Source & Contributions
Found a bug with HTML tags or want to help implement full visual mode?
Check out source code, file issues, or submit PRs here:
π GitHub Repository