AnkiVim

AnkiWeb addon 978943807

Adds modal Vim/Neovim-style editing and keybindings to Anki's note editor, with many motions and operators still partially implemented or under development.
AI-generated summary; may contain mistakes.

note-managementshortcutsbeta

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-05-23
Anki versions
25.09.4~
License
AGPL-3.0 (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
JavaScript, Python, Ignore List, CSS
Description language
en

Maintenance

active

  • Last update or commit: 2026-05-23 (162 days before the snapshot).
  • Commits in the last year: 6.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

GitHub

Repository
liwoe/ankivim Β· more by liwoe
Stars
⭐ 2 · forks 0 · open issues 0
Last commit
2026-05-23
License
AGPL-3.0
Languages
JavaScript, Python, CSS
Tests
0

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
23.1025.09.4+2026-05-23
History across monthly snapshots

Loading…

Similar addons

Anki-Coder

Adds a CodeMirror code editor to Anki flashcards with syntax highlighting, themes, live preview, double-click editing, configurable languages and note types, and mobile and cloze-card support.

formattingappearancemobile-compatible

9 votes 45% approval πŸ‘ 7 Β· πŸ‘Ž 2 ⭐ 4 Anki 25.07.6~ Updated 2026-04-22
Vim Mode

Adds Vim-style keybindings to Anki's note editor, with normal and insert modes, cursor movement, J/K field navigation, a mode indicator, and partially working visual, delete, and yank operations.

shortcutsbeta

2 votes 9% approval πŸ‘ 1 Β· πŸ‘Ž 1 ⭐ 3 Anki 25.09.1~ Updated 2026-06-11

Description

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

README

BetterAnkiVim πŸš€

A lightweight, robust Anki add-on that brings modal editing and Vim/Neovim keybindings directly into the Anki note editor. Built using a fast Python-JavaScript bridge to handle DOM manipulations natively.

Features ✨

  • Modal Editing: Toggle between standard input and Vim commands effortlessly.
  • Core Motions: Seamlessly navigate text fields using standard h, j, k, l movements.
  • Registers: Basics for delete (d). The yank (y) and paste (p) commands will be implemented soon.
  • Operators & Motions: Standard combinations like w, b, e, 0, $, gg, G, etc.
  • Native Look: Blends cleanly into Anki's native editor styling (native_vim.css).

Current Project Structure πŸ“‚

The project is structured with modularity in mind, splitting the JavaScript engine from the Anki Python wrapper:

  • __init__.py: Add-on entry point and Python-to-JavaScript communication bridge.
  • manifest.json / meta.json: Anki add-on configurations.
  • parser.py: Is the core for this project. Instead of directly handeling commands etc. I wrote an own python parser.
  • /UI: For this project to work I needed javascript injections. The parsed commands get handled in this folder. (I will rename this folder soon)

⚠️ Work in Progress / Limitations

Please note that this add-on is currently under active development. Some core Vim functionalities are not fully implemented yet:

  • Visual Mode: Visual (v) and Visual Line (V) selections: The commands / motions don't work in here yet.
  • Command-Line Mode: Complex commands (via :) and advanced parsing are still not implemented at all.
  • Complex Combos: Certain multi-stroke operators or edge-case text objects are still being refactored. Like (`
      ') tags.

    Installation πŸ› οΈ

    Manual Installation (Development)

    1. Option: Just download via the Anki-Addon page you came from. (Follow instructions there.): https://ankiweb.net/shared/info/978943807?cb=1779547478922

    2. Option: Clone this repository into your Anki add-ons folder:

      cd %APPDATA%\Anki2\addons21
      git clone [https://github.com/liwoe/AnkiVim.git](https://github.com/liwoe/AnkiVim.git) BetterAnkiVim
      
      

    Contribution

    Feel free to commit to my project and report Issues/Bugs. It may take some time for to fix them and implement other stuff as I dont have much time currently.