Syntax Highlighting (NG)

AnkiWeb addon 566351439

Fork of Syntax Highlighting for Code (AI-detected; may be wrong)

3 other versions of this addon exist. Compare versions ↓

Inserts syntax-highlighted code snippets into Anki flashcards, offering a Python 3 port, unit tests, linter support, and compatibility with the latest Anki versions.
AI-generated summary; may contain mistakes.

formattingfork-or-reupload

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
44 (👍 41 · 👎 3)
Updated
2024-07-19
Anki versions
23.10.1~
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
Python, JSON
Description language
en

Maintenance

abandoned

  • Last update or commit: 2024-07-19 (835 days before the snapshot).
  • Test files: 3.
  • GitHub Actions workflows: 3.
  • Commits in the last year: 0.
  • Issues: 8 open, 3 closed.
  • Pull requests: 2 open, 5 merged.
  • Median first response: 16 hours (9 answered issues and pull requests).
  • Outside pull requests: 100% of 2 merged.
  • Forks that may still be maintained: "⚡️Syntax Highlighter - Quick highlight Code for Editor (Customized by Shigeඞ)" (272582198).

GitHub

Repository
cav71/syntax-highlighting-ng · more by cav71
Stars
⭐ 34 · forks 2 · open issues 10
Last commit
2024-07-19
License
A license file that GitHub does not recognize
Languages
Python, HTML, Dockerfile
Tests
3

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.4923.10.1+2024-07-19
History across monthly snapshots

Loading…

Compare versions

The original addon and its forks. The best value in each column is in bold.

VersionWorks on Anki 26.09.3MaintenanceLast activity VotesApprovalGitHub starsNotes
Syntax Highlighting for Code original unknown abandoned 23 Jan 2024 👍 208 · 👎 49 76% 121
↳ Syntax Highlighting (NG) this addon (AI-detected; may be wrong) likely abandoned 19 Jul 2024 👍 41 · 👎 3 82% 34
↳ ⚡️Syntax Highlighter - Quick highlight Code for Editor (Customized by Shigeඞ) (AI-detected; may be wrong) likely active 29 May 2026 👍 30 · 👎 0 89% 12
↳ syntax highlighting FORK (css only, night-mode) (AI-detected; may be wrong) likely abandoned 19 Mar 2023 👍 6 · 👎 2 41% – obsolete

Forks can add features or work in a different way. Read the description before you change to another version. Fork detection is incomplete, so other versions can exist.

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
Mini Format Pack

Adds editor buttons for highlighting, code blocks, horizontal lines, lists, indentation, and alignment, with configurable hotkeys, tooltips, and button order.

formattingshortcutsfork-or-reupload

224 votes 93% approval 👍 216 · 👎 8 ⭐ 54 Anki 23.10~ Updated 2023-11-02

Description

This is a new fork from the original "Syntax Highlighting for Code" (see References below).

Source code License - GNU AGPLv3 linting - Ruff types - Mypy

Allows you to insert syntax-highlighted code snippets into the spaced-repetition flashcard app Anki.

The main reasons to create it is:

  • fix these issues:
    PR46
    PR47
  • clean port to python 3
  • adds unittests
  • always target the latest Anki version (eg. 2.1)

References

  • Syntax Highlighting for Code release
  • syntax highlighting FORK (css only, night-mode) release

README

syntax-highlighting (NG)

Release License - GNU AGPLv3 linting - Ruff types - Mypy

This is a new fork from the original "Syntax Highlighting for Code" (see License and Credits below).

This add-on allows you to insert syntax-highlighted code snippets into the spaced-repetition flashcard app Anki.

The main reasons are:

  • to fix these issues: PR46, PR47
  • clean port to python 3
  • support for mypy/ruff linters
  • adds unittests
  • always target the latest Anki version (eg. 2.1) and the latest Anki python version (at the moment 3.9)

Table of Contents

Installation

AnkiWeb

The easiest way to install Syntax Highlighting is through AnkiWeb code 566351439.

Manual installation

Please click on the entry corresponding to your Anki version:

Anki 2.1
  1. Make sure you have the latest version of Anki 2.1 installed. Earlier releases (e.g. found in various Linux distros) do not support .ankiaddon packages.
  2. Download the latest .ankiaddon package from the releases tab (you might need to click on Assets below the description to reveal the download links)
  3. From Anki's main window, head to Tools → Add-ons
  4. Drag-and-drop the .ankiaddon package onto the add-ons list
  5. Restart Anki
Anki 2.0 **No support for 2.0**

Documentation

For further information on the use of this add-on please check out the description text for AnkiWeb.

Building

With Anki add-on builder installed:

git clone https://github.com/glutanimate/syntax-highlighting.git
cd syntax-highlighting
aab build

For more information on the build process please refer to aab's documentation.

Contributing

Contributions are welcome! Please review the contribution guidelines on how to:

  • Report issues
  • File pull requests
  • Support the project as a non-developer

License and Credits

Syntax Highlighting (NG) is

Copyright © 2023- Antonio Cavallo

Syntax Highlighting is

Copyright © 2018-2019 Aristotelis P. (Glutanimate)

Copyright © 2015 Tim Rae

Copyright © 2012-2015 Tiago Barroso

Syntax Highlighting is based on Syntax Highlighting for Code by Tiago Barroso. All credit for the original add-on goes to him. A major thanks is also due for Tim Rae, who extended the original add-on with CSS support.

The present fork and update to Anki 2.1 was made possible through the generous support of a fellow Anki user who would like to remain anonymous.

Syntax Highlighting ships with the following third-party open-source software:

  • Pygments v2.17.2. Copyright (c) 2006-2023 by the Pygments Team. Licensed under the BSD license.

Syntax Highlighting is free and open-source software. The add-on code that runs within Anki is released under the GNU AGPLv3 license, extended by a number of additional terms. For more information please see the LICENSE file that accompanied this program.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.


The continued development of this add-on is made possible
thanks to my Patreon and Ko-Fi supporters.
You guys rock ❤️ !