Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/midrare/anki-code-highlight
Syntax highlighting for code blocks in Anki
https://github.com/midrare/anki-code-highlight
anki anki-addon code-highlight syntax-highlighting
Last synced: about 1 month ago
JSON representation
Syntax highlighting for code blocks in Anki
- Host: GitHub
- URL: https://github.com/midrare/anki-code-highlight
- Owner: midrare
- License: mit
- Created: 2024-02-18T02:36:21.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-02-20T19:20:08.000Z (11 months ago)
- Last Synced: 2024-10-15T07:41:16.584Z (3 months ago)
- Topics: anki, anki-addon, code-highlight, syntax-highlighting
- Language: CSS
- Homepage:
- Size: 139 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# anki-code-highlight
**Code highlighting for Anki.**
![Screenshot](screen.png)
## Getting Started
### Prerequisites
1. Go to Anki -> Tools (menubar) -> Add-ons -> Install from file
2. Select file downloaded from releases page## Usage
In the note editor, click the `<>` button and enclose your code in ``. In the previewer and reviewer, code highlighting will be applied automatically....
By default, the programming language is auto-detected. You can manually specify the language editing the `class` attribute e.g. `
`. Look in `highlightjs/languages` for the list of language codes you can choose from. Consider doing this if auto-detecting takes too long (makes the reviewer lag).
*anki-code-highlight* is non-invasive; it doesn't modify your original note to add the highlighting. If you disable or uninstall *anki-code-highlight*, your `pre code` blocks just return to being normal `pre code` blocks.
You can change the font size in the config file. Any valid [CSS font-size property](https://www.w3schools.com/css/css_font_size.asp) is valid in this field.
The color scheme can changed by setting the config file. Look in `highlightjs/styles` for the list of color schemes you can choose from.
## License
Distributed under the MIT license. See `LICENSE.txt` for more information## Acknowledgements
Uses [highlight.js](https://highlightjs.org/), included under the BSD 3-Clause license. See `highlightjs/LICENSE` file for license details.