pygmentize
Syntax highlight source code
TLDR
Highlight code file
SYNOPSIS
pygmentize [options] [file]
DESCRIPTION
pygmentize is the command-line interface for the Pygments syntax highlighting library. It reads source code files and outputs syntax-highlighted versions in various formats including terminal ANSI colors, HTML, LaTeX, RTF, and SVG, supporting over 500 programming languages and markup formats.
The tool auto-detects the input language from file extensions or can be specified explicitly with -l. Output format is set with -f, and visual themes are controlled with -S for generating CSS stylesheets. pygmentize is widely used for generating highlighted code in documentation, blogs, and presentations.
PARAMETERS
FILE
Input file.-f FORMATTER
Output format.-l LEXER
Language lexer.-o FILE
Output file.-S STYLE
Syntax style.-L
List available options.
CAVEATS
Python library required. Many output formats.
HISTORY
Pygments was created as a syntax highlighting library for Python.
SEE ALSO
highlight(1), source-highlight(1)
