Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

26
chroma Normal file
View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# chroma
> A general-purpose syntax highlighter.
> The `--lexer` option is usually unnecessary, as it will be automatically determined based on the file extension.
> More information: <https://github.com/alecthomas/chroma>.
- Highlight source code from a file with the Python lexer and output to `stdout`:
`chroma --lexer {{python}} {{path/to/source_file.py}}`
- Highlight source code from a file with the Go lexer and output to an HTML file:
`chroma --lexer {{go}} --formatter {{html}} {{path/to/source_file.go}} > {{path/to/target_file.html}}`
- Highlight source code from `stdin` with the C++ lexer and output to an SVG file, using the Monokai style:
`{{command}} | chroma --lexer {{c++}} --formatter {{svg}} --style {{monokai}} > {{path/to/target_file.svg}}`
- List available lexers, styles and formatters:
`chroma --list`