Write Anki Notes in Visual Studio Code
This is a set of tools designed for people who love Anki’s spaced repetition system but prefer writing and managing
notes in a normal text editor instead of Anki’s built-in editor.
The tools include:
It enables a workflow where you:
- Write notes in a simple human-readable text-based format.
- Store them in a regular directory.
- Import them into Anki automatically.
This makes it possible to:
- Use a real editor like Visual Studio Code.
- Version control your notes with Git.
- Collaborate with others.
- Avoid Anki’s proprietary binary deck format.
Example Note Files
File astronomy.note:
!type: Basic
!deck: Astronomy
!front: The first planet from the Sun.
!back: Mercury
~~~
!front: The second planet from the Sun.
!back: Venus
~~~
!front: The largest planet in the Solar System.
!back: Jupiter
~~~
File geography.note:
!type: Cloze
!deck: Geography
!tags: Capitals
!text: The capital of {{c1::Mongolia::country}} is {{c2::Ulaanbaatar::city}}.
~~~
!text: The capital of {{c1::Syria::country}} is {{c2::Damascus::city}}.
~~~
File math.note:
!type: Basic
!deck: Math
!tags: Algebra
!front: Quadratic Formula
!back: $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$
~~~
!front: Euler's Formula
!back:
$$
\begin{align*}
e^{ix} &= \cos x + i \sin x \\
e^{-ix} &= \cos x - i \sin x
\end{align*}
$$
~~~
Anki Addon
To simplify importing notes, we developed an Anki addon that imports all
note files from a specified directory.
The addon:
- Asks the user to select a directory containing note files.
- Recursively scans the directory.
- Parses the note records.
- Creates or updates Anki notes.
Visual Studio Code Extension
To make writing notes easier, this VS Code extension is available.

The extension provides:
- syntax highlighting for note files
- auto-completion
- structural validation
- note preview on the side
This makes writing Anki notes feel like writing documentation.
Features
Preview
todo
Syntax Highlighting
todo
Autocompletion
todo
Automatic Note ID Insertion
todo
Workflow
Typical workflow:
- Write notes in Visual Studio Code.
notes/
calculus.note
algebra.note
trigonometry.note
- Version control them.
git add notes
git commit
- Import into Anki using the addon.
File → Import Models and Notes...
- Select the directory with your notes.
The addon will parse and import everything.
- Maybe share your notes with others. Let them collaborate and contribute new notes.