chroma
A general-purpose syntax highlighter. The
--lexeroption is usually unnecessary, as it will be automatically determined based on the file extension. More information: https://manned.org/chroma.
- Highlight source code from a file with the Python lexer and output to
stdout:
chroma
- Highlight source code from a file with the Go lexer and output to an HTML file:
chroma >
- Highlight source code from
stdinwith the C++ lexer and output to an SVG file, using the Monokai style:
| chroma >
- List available lexers, styles, and formatters:
chroma --list
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
