anki-capture

Like org-capture for Anki notes
git clone git://git.wrycode.com/wrycode/anki-capture.git
Log | Files | Refs | README

README.org (2890B)


      1 * Description
      2 Anki-capture is an interface for adding notes to
      3 [[https://apps.ankiweb.net/][Anki]] from Emacs that is analogous to
      4 [[https://orgmode.org/manual/Capture.html][org-capture]]. It uses Org
      5 mode syntax to author notes so you can easily insert LaTeX formulas,
      6 images, and miscellaneous
      7 formatting. [[https://github.com/louietan/anki-editor][Anki-editor]]
      8 provides the layout for notes and the elisp backend connection to
      9 [[https://ankiweb.net/shared/info/2055492159][AnkiConnect]]. This
     10 package includes some helpful commands from
     11 [[https://yiufung.net/post/anki-org/][Cheong Yiufung]] for quickly
     12 inserting cloze deletions.
     13 
     14 * Installation
     15 Using [[https://github.com/raxod502/straight.el][straight.el]]
     16 (recommended):
     17 
     18 #+begin_src elisp
     19 (straight-use-package `(anki-capture :type git :repo "git://git.wrycode.com/wrycode/anki-capture.git"))
     20 #+end_src
     21 
     22 I haven't bothered with MELPA yet, but =anki-capture.el= is a standard
     23 elisp package (a single file with autoloads), so you can install it
     24 by visiting the buffer and running =package-install-from-buffer=.
     25 
     26 * Configuration
     27 Here are some recommended (optional) settings. Substitute your own
     28 preferred keybindings:
     29 
     30 #+begin_src emacs-lisp
     31 ;; cloze region using the next cloze number
     32 (define-key org-mode-map (kbd "M-n") 'anki-editor-cloze-region-auto-incr)
     33 ;; cloze region using the current cloze number
     34 (define-key org-mode-map (kbd "M-N") 'anki-editor-cloze-region-dont-incr)
     35 
     36 (define-key org-mode-map (kbd "<f10>") 'anki-editor-reset-cloze-number)
     37 
     38 
     39 (setq anki-editor-create-decks t ;; Allow anki-editor to create a new deck if it doesn't exist
     40       anki-editor-org-tags-as-anki-tags t) ;; use Org mode tags as Anki note tags
     41 
     42 (define-key global-map (kbd "C-c e") 'anki-capture) ;; capture a new note into Anki
     43 #+end_src
     44 
     45 If you would like to automatically insert text from the kill
     46 ring/clipboard into your notes, set the variable
     47 =anki-capture-auto-yank= to non-nil.
     48 
     49 # You can optionally set some defaults note settings for when you first
     50 # start Emacs:
     51 
     52 # #+begin_src emacs-lisp
     53 # (setq anki-capture-file "~/docs/anki.org") ; stores all anki-capture notes
     54 # (setq anki-capture-deck "INBOX")	   ; default deck to capture into
     55 # #+end_src
     56 
     57 * Usage
     58 
     59 The idea is that you can use =anki-editor='s note format to add new
     60 notes to Anki as quickly as possible. Often you will want to add a
     61 series of similar notes. =anki-capture= will assume that you want the
     62 same note settings (Anki deck, tags, and Anki note type) each time you
     63 invoke it unless you use a prefix argument (C-u). See =anki-capture='s
     64 docstring for more info: =C-h f anki-capture=.
     65 
     66 If you do not set =anki-capture-file=, notes will be stored in a
     67 buffer called =*anki-capture-storage-buffer*=. This will NOT be saved
     68 if you restart Emacs.
     69 
     70 I recommend using underscores "=_=" to emulate spaces in your tags because
     71 this will work well in both Org mode and Anki.