mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 13:46:00 +02:00
chroma: add page (#4603)
This commit is contained in:
parent
c38ba9528c
commit
e5d969ecb3
1 changed files with 16 additions and 0 deletions
16
pages/common/chroma.md
Normal file
16
pages/common/chroma.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# chroma
|
||||
|
||||
> Chroma is a general-purpose syntax highlighting library and corresponding command, for Go.
|
||||
> More information: <https://github.com/alecthomas/chroma>.
|
||||
|
||||
- Highlight a source file with python lexer and output to terminal:
|
||||
|
||||
`chroma --lexer="{{python}}" {{source_file}}`
|
||||
|
||||
- Highlight a source file with Go lexer and output to a HTML file:
|
||||
|
||||
`chroma --lexer="{{go}}" --formatter="{{html}}" {{source_file}} > {{html_file}}`
|
||||
|
||||
- Highlight a source file with C++ lexer and output to an SVG image, using the Monokai style:
|
||||
|
||||
`chroma --lexer="{{c++}}" --formatter="{{svg}}" --syle="{{monokai}}" {{source_file}} > {{svg_file}}`
|
Loading…
Add table
Reference in a new issue