mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-09 15:35:43 +02:00
add pygmentize
This commit is contained in:
parent
6ae8e8761a
commit
7d360fface
1 changed files with 27 additions and 0 deletions
27
pages/common/pygmentize.md
Normal file
27
pages/common/pygmentize.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# pygmentize
|
||||||
|
|
||||||
|
> CLI Python Syntax Highlighter.
|
||||||
|
|
||||||
|
- Highlight syntax:
|
||||||
|
|
||||||
|
`pygmentize {{filename}}`
|
||||||
|
|
||||||
|
- Highlight syntax (another language):
|
||||||
|
|
||||||
|
`pygmentize -l {{lexer}} {{filename}}`
|
||||||
|
|
||||||
|
- Show avaliable lexers:
|
||||||
|
|
||||||
|
`pygmentize -L lexers`
|
||||||
|
|
||||||
|
- Output to HTML:
|
||||||
|
|
||||||
|
`pygmentize -f html -l {{lexer}} -o {{output}} {{filename}}`
|
||||||
|
|
||||||
|
- Show avaliable output formats:
|
||||||
|
|
||||||
|
`pygmentize -L formatters`
|
||||||
|
|
||||||
|
- Output to HTML with a line numbers:
|
||||||
|
|
||||||
|
`pygmentize -f html -O linenos=1 -l {{lexer}} -o {{output}} {{filename}}`
|
Loading…
Add table
Reference in a new issue