1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 20:42:07 +02:00

Simplify pygmentize

- Simplify main description
- Mentioning that language is inferred from file extension
- Giving a concrete example for another lexer.
This commit is contained in:
Agniva De Sarker 2017-04-24 12:03:27 +05:30 committed by Waldir Pimenta
parent 5c278bdf69
commit d49b95fc53

View file

@ -1,27 +1,27 @@
# pygmentize # pygmentize
> CLI Python Syntax Highlighter. > Python based syntax highlighter.
- Highlight syntax: - Highlight file syntax and print to standard output. Language is inferred from the file extension:
`pygmentize {{filename}}` `pygmentize {{file.py}}`
- Highlight syntax (another language): - Highlight syntax for a given language:
`pygmentize -l {{lexer}} {{filename}}` `pygmentize -l {{javascript}} {{javascript_file}}`
- Show avaliable lexers: - Show avaliable lexers:
`pygmentize -L lexers` `pygmentize -L lexers`
- Output to HTML: - Redirect output to a file in html format:
`pygmentize -f html -l {{lexer}} -o {{output}} {{filename}}` `pygmentize -f html -o {{file.html}} {{file.py}}`
- Show avaliable output formats: - Show avaliable output formats:
`pygmentize -L formatters` `pygmentize -L formatters`
- Output to HTML with a line numbers: - Output to HTML file with line numbers, specifying a given language:
`pygmentize -f html -O linenos=1 -l {{lexer}} -o {{output}} {{filename}}` `pygmentize -f html -O linenos=1 -l {{language}} -o {{file.html}} {{file}}`