Skip to content

davidshepherd7/anki-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI melpa

Anki mode

A major mode for creating Anki cards.

Installation

  1. Install anki-connect (anki addon 2055492159) and restart Anki.
  2. Install this package (either by using melpa, or by dropping the .el file into your path and require-ing it).
  3. Set anki-mode-markdown-command to your preferred markdown parser command, or install pandoc to use the default. pandoc with github flavoured markdown is the default because it handles _ well. To disable markdown entirely set anki-mode-markdown-command to cat.

For pandoc version 2.0 or older you'll need to modify anki-mode-markdown-command slightly:

(setq anki-mode-markdown-command "pandoc --from markdown_github --to html")

Usage

Call anki-mode-menu to begin. Note that Anki must be running in order to use anki-mode.

Other features

  • Press $ to insert [$] [/$] for latex maths.
  • Press tab to cycle through card fields.
  • Command anki-mode-cloze-region: wrap the selected region in a cloze deletion (with the number autodetected).

TODO

  • Updating existing cards would be useful.
  • Currently LaTeX can only be compiled within Anki itself (by previewing the card).

File format

The @ character at the beginning of a line is used to mark the name of a field. Everything else on the line is used as the field name (with leading and trailing whitespace removed), everything from the next line until the start of the next field is used as the contents of the field.

For example a standard "Basic" card type would be written as:

@Front
What is a foo?
@Back
A particularly vicious variety of dandelion.

You can use markdown inside fields.

See also

If you prefer org-mode to markdown, you might prefer to use anki-editor.

org-drill and pamparam are implementations of an entire spaced repetition system within Emacs. You might prefer one of these if you want to do the memorisation part of spaced repetition within Emacs, I prefer to use the Anki mobile app.

Changelog

Unstable

  • A magit-status-like menu screen
  • Cycle through card fields
  • Various minor quality improvements
  • Handling of non-default card types
  • Add an error message when card already exists
  • Depend on pandoc 2.0 by default

0.1

  • Basic card creation
  • Markdown rendering