Pygments
Available lexers
« Back To IndexContents
- Lexers for agile languages
- Lexers for assembly languages
- Lexers for compiled languages
- Pygments lexers for Dalvik VM-related languages
- Lexers for .net languages
- Simple lexer for Microsoft Visual FoxPro source code
- Lexers for functional languages
- Lexers for hardware descriptor languages
- Pygments lexers for JVM languages
- Lexers for math languages
- Lexers for other languages
- Lexers for parser generators
- Lexers for various shells
- Special lexers
- Lexers for various SQL dialects and related interactive sessions
- Lexers for various template engines' markup
- Lexers for non-source code file types
- Lexers for web-related languages and markup
- Iterating over all lexers
This page lists all available builtin lexers and the options they take.
Currently, all lexers support these options:
- stripnl
- Strip leading and trailing newlines from the input (default: True)
- stripall
- Strip all leading and trailing whitespace from the input (default: False).
- ensurenl
- Make sure that the input ends with a newline (default: True). This is required for some lexers that consume input linewise. New in Pygments 1.3.
- tabsize
- If given and greater than 0, expand tabs in the input (default: 0).
- encoding
New in Pygments 0.6.
If given, must be an encoding name (such as "utf-8"). This encoding will be used to convert the input string to Unicode (if it is not already a Unicode string). The default is "latin1".
If this option is set to "guess", a simple UTF-8 vs. Latin-1 detection is used, if it is set to "chardet", the chardet library is used to guess the encoding of the input.
The "Short Names" field lists the identifiers that can be used with the get_lexer_by_name() function.
These lexers are builtin and can be imported from pygments.lexers:
Lexers for agile languages
CrocLexer
For Croc source.
Short names: croc Filename patterns: *.croc Mimetypes: text/x-crocsrc
DgLexer
Lexer for dg, a functional and object-oriented programming language running on the CPython 3 VM.
New in Pygments 1.6.
Short names: dg Filename patterns: *.dg Mimetypes: text/x-dg
FactorLexer
Lexer for the Factor language.
New in Pygments 1.4.
Short names: factor Filename patterns: *.factor Mimetypes: text/x-factor
FancyLexer
Pygments Lexer For Fancy.
Fancy is a self-hosted, pure object-oriented, dynamic, class-based, concurrent general-purpose programming language running on Rubinius, the Ruby VM.
New in Pygments 1.5.
Short names: fancy, fy Filename patterns: *.fy, *.fancypack Mimetypes: text/x-fancysrc
IoLexer
For Io (a small, prototype-based programming language) source.
New in Pygments 0.10.
Short names: io Filename patterns: *.io Mimetypes: text/x-iosrc
LuaLexer
For Lua source code.
Additional options accepted:
- func_name_highlighting
- If given and True, highlight builtin function names (default: True).
- disabled_modules
If given, must be a list of module names whose function names should not be highlighted. By default all modules are highlighted.
To get a list of allowed modules have a look into the _luabuiltins module:
>>> from pygments.lexers._luabuiltins import MODULES >>> MODULES.keys() ['string', 'coroutine', 'modules', 'io', 'basic', ...]
Short names: lua Filename patterns: *.lua, *.wlua Mimetypes: text/x-lua, application/x-lua
MiniDLexer
For MiniD source. MiniD is now known as Croc.
Short names: minid Filename patterns: *.md Mimetypes: text/x-minidsrc
MoonScriptLexer
For MoonScript source code.
New in Pygments 1.5.
Short names: moon, moonscript Filename patterns: *.moon Mimetypes: text/x-moonscript, application/x-moonscript
PerlLexer
For Perl source code.
Short names: perl, pl Filename patterns: *.pl, *.pm Mimetypes: text/x-perl, application/x-perl
Python3Lexer
For Python source code (version 3.0).
New in Pygments 0.10.
Short names: python3, py3 Filename patterns: None Mimetypes: text/x-python3, application/x-python3
Python3TracebackLexer
For Python 3.0 tracebacks, with support for chained exceptions.
New in Pygments 1.0.
Short names: py3tb Filename patterns: *.py3tb Mimetypes: text/x-python3-traceback
PythonConsoleLexer
For Python console output or doctests, such as:
>>> a = 'foo' >>> print a foo >>> 1 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zeroAdditional options:
- python3
- Use Python 3 lexer for code. Default is False. New in Pygments 1.0.
Short names: pycon Filename patterns: None Mimetypes: text/x-python-doctest
PythonLexer
For Python source code.
Short names: python, py, sage Filename patterns: *.py, *.pyw, *.sc, SConstruct, SConscript, *.tac, *.sage Mimetypes: text/x-python, application/x-python
PythonTracebackLexer
For Python tracebacks.
New in Pygments 0.7.
Short names: pytb Filename patterns: *.pytb Mimetypes: text/x-python-traceback
RubyConsoleLexer
For Ruby interactive console (irb) output like:
irb(main):001:0> a = 1 => 1 irb(main):002:0> puts a 1 => nil
Short names: rbcon, irb Filename patterns: None Mimetypes: text/x-ruby-shellsession
RubyLexer
For Ruby source code.
Short names: rb, ruby, duby Filename patterns: *.rb, *.rbw, Rakefile, *.rake, *.gemspec, *.rbx, *.duby Mimetypes: text/x-ruby, application/x-ruby
TclLexer
For Tcl source code.
New in Pygments 0.10.
Short names: tcl Filename patterns: *.tcl Mimetypes: text/x-tcl, text/x-script.tcl, application/x-tcl
Lexers for assembly languages
CObjdumpLexer
For the output of 'objdump -Sr on compiled C files'
Short names: c-objdump Filename patterns: *.c-objdump Mimetypes: text/x-c-objdump
Ca65Lexer
For ca65 assembler sources.
New in Pygments 1.6.
Short names: ca65 Filename patterns: *.s Mimetypes: None
CppObjdumpLexer
For the output of 'objdump -Sr on compiled C++ files'
Short names: cpp-objdump, c++-objdumb, cxx-objdump Filename patterns: *.cpp-objdump, *.c++-objdump, *.cxx-objdump Mimetypes: text/x-cpp-objdump
DObjdumpLexer
For the output of 'objdump -Sr on compiled D files'
Short names: d-objdump Filename patterns: *.d-objdump Mimetypes: text/x-d-objdump
GasLexer
For Gas (AT&T) assembly code.
Short names: gas Filename patterns: *.s, *.S Mimetypes: text/x-gas
LlvmLexer
For LLVM assembly code.
Short names: llvm Filename patterns: *.ll Mimetypes: text/x-llvm
NasmLexer
For Nasm (Intel) assembly code.
Short names: nasm Filename patterns: *.asm, *.ASM Mimetypes: text/x-nasm
ObjdumpLexer
For the output of 'objdump -dr'
Short names: objdump Filename patterns: *.objdump Mimetypes: text/x-objdump
Lexers for compiled languages
AdaLexer
For Ada source code.
New in Pygments 1.3.
Short names: ada, ada95ada2005 Filename patterns: *.adb, *.ads, *.ada Mimetypes: text/x-ada
BlitzMaxLexer
For BlitzMax source code.
New in Pygments 1.4.
Short names: blitzmax, bmax Filename patterns: *.bmx Mimetypes: text/x-bmx
CLexer
For C source code with preprocessor directives.
Short names: c Filename patterns: *.c, *.h, *.idc Mimetypes: text/x-chdr, text/x-csrc
CobolFreeformatLexer
Lexer for Free format OpenCOBOL code.
New in Pygments 1.6.
Short names: cobolfree Filename patterns: *.cbl, *.CBL Mimetypes: None
CobolLexer
Lexer for OpenCOBOL code.
New in Pygments 1.6.
Short names: cobol Filename patterns: *.cob, *.COB, *.cpy, *.CPY Mimetypes: text/x-cobol
CppLexer
For C++ source code with preprocessor directives.
Short names: cpp, c++ Filename patterns: *.cpp, *.hpp, *.c++, *.h++, *.cc, *.hh, *.cxx, *.hxx, *.C, *.H, *.cp, *.CPP Mimetypes: text/x-c++hdr, text/x-c++src
CudaLexer
For NVIDIA CUDA™ source.
New in Pygments 1.6.
Short names: cuda, cu Filename patterns: *.cu, *.cuh Mimetypes: text/x-cuda
CythonLexer
For Pyrex and Cython source code.
New in Pygments 1.1.
Short names: cython, pyx Filename patterns: *.pyx, *.pxd, *.pxi Mimetypes: text/x-cython, application/x-cython
DLexer
For D source.
New in Pygments 1.2.
Short names: d Filename patterns: *.d, *.di Mimetypes: text/x-dsrc
DelphiLexer
For Delphi (Borland Object Pascal), Turbo Pascal and Free Pascal source code.
Additional options accepted:
- turbopascal
- Highlight Turbo Pascal specific keywords (default: True).
- delphi
- Highlight Borland Delphi specific keywords (default: True).
- freepascal
- Highlight Free Pascal specific keywords (default: True).
- units
- A list of units that should be considered builtin, supported are System, SysUtils, Classes and Math. Default is to consider all of them builtin.
Short names: delphi, pas, pascal, objectpascal Filename patterns: *.pas Mimetypes: text/x-pascal
DylanLexer
For the Dylan language.
New in Pygments 0.7.
Short names: dylan Filename patterns: *.dylan, *.dyl, *.intr Mimetypes: text/x-dylan
DylanLidLexer
For Dylan LID (Library Interchange Definition) files.
New in Pygments 1.6.
Short names: dylan-lid, lid Filename patterns: *.lid, *.hdp Mimetypes: text/x-dylan-lid
ECLexer
For eC source code with preprocessor directives.
New in Pygments 1.5.
Short names: ec Filename patterns: *.ec, *.eh Mimetypes: text/x-echdr, text/x-ecsrc
FantomLexer
For Fantom source code.
New in Pygments 1.5.
Short names: fan Filename patterns: *.fan Mimetypes: application/x-fantom
FelixLexer
For Felix source code.
New in Pygments 1.2.
Short names: felix, flx Filename patterns: *.flx, *.flxh Mimetypes: text/x-felix
FortranLexer
Lexer for FORTRAN 90 code.
New in Pygments 0.10.
Short names: fortran Filename patterns: *.f, *.f90, *.F, *.F90 Mimetypes: text/x-fortran
GLShaderLexer
GLSL (OpenGL Shader) lexer.
New in Pygments 1.1.
Short names: glsl Filename patterns: *.vert, *.frag, *.geo Mimetypes: text/x-glslsrc
GoLexer
For Go source.
Short names: go Filename patterns: *.go Mimetypes: text/x-gosrc
Modula2Lexer
For Modula-2 source code.
Additional options that determine which keywords are highlighted:
- pim
- Select PIM Modula-2 dialect (default: True).
- iso
- Select ISO Modula-2 dialect (default: False).
- objm2
- Select Objective Modula-2 dialect (default: False).
- gm2ext
- Also highlight GNU extensions (default: False).
New in Pygments 1.3.
Short names: modula2, m2 Filename patterns: *.def, *.mod Mimetypes: text/x-modula2
MonkeyLexer
For Monkey source code.
New in Pygments 1.6.
Short names: monkey Filename patterns: *.monkey Mimetypes: text/x-monkey
NimrodLexer
For Nimrod source code.
New in Pygments 1.5.
Short names: nimrod, nim Filename patterns: *.nim, *.nimrod Mimetypes: text/x-nimrod
ObjectiveCLexer
For Objective-C source code with preprocessor directives.
Short names: objective-c, objectivec, obj-c, objc Filename patterns: *.m, *.h Mimetypes: text/x-objective-c
ObjectiveCppLexer
For Objective-C++ source code with preprocessor directives.
Short names: objective-c++, objectivec++, obj-c++, objc++ Filename patterns: *.mm, *.hh Mimetypes: text/x-objective-c++
OocLexer
For Ooc source code
New in Pygments 1.2.
Short names: ooc Filename patterns: *.ooc Mimetypes: text/x-ooc
PrologLexer
Lexer for Prolog files.
Short names: prolog Filename patterns: *.prolog, *.pro, *.pl Mimetypes: text/x-prolog
RustLexer
Lexer for Mozilla's Rust programming language.
New in Pygments 1.6.
Short names: rust Filename patterns: *.rs, *.rc Mimetypes: text/x-rustsrc
ValaLexer
For Vala source code with preprocessor directives.
New in Pygments 1.1.
Short names: vala, vapi Filename patterns: *.vala, *.vapi Mimetypes: text/x-vala
Lexers for .net languages
BooLexer
For Boo source code.
Short names: boo Filename patterns: *.boo Mimetypes: text/x-boo
CSharpAspxLexer
Lexer for highligting C# within ASP.NET pages.
Short names: aspx-cs Filename patterns: *.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd Mimetypes: None
CSharpLexer
For C# source code.
Additional options accepted:
- unicodelevel
Determines which Unicode characters this lexer allows for identifiers. The possible values are:
- none -- only the ASCII letters and numbers are allowed. This is the fastest selection.
- basic -- all Unicode characters from the specification except category Lo are allowed.
- full -- all Unicode characters as specified in the C# specs are allowed. Note that this means a considerable slowdown since the Lo category has more than 40,000 characters in it!
The default value is basic.
New in Pygments 0.8.
Short names: csharp, c# Filename patterns: *.cs Mimetypes: text/x-csharp
FSharpLexer
For the F# language.
New in Pygments 1.5.
Short names: fsharp Filename patterns: *.fs, *.fsi Mimetypes: text/x-fsharp
NemerleLexer
For Nemerle source code.
Additional options accepted:
- unicodelevel
Determines which Unicode characters this lexer allows for identifiers. The possible values are:
- none -- only the ASCII letters and numbers are allowed. This is the fastest selection.
- basic -- all Unicode characters from the specification except category Lo are allowed.
- full -- all Unicode characters as specified in the C# specs are allowed. Note that this means a considerable slowdown since the Lo category has more than 40,000 characters in it!
The default value is basic.
New in Pygments 1.5.
Short names: nemerle Filename patterns: *.n Mimetypes: text/x-nemerle
VbNetAspxLexer
Lexer for highligting Visual Basic.net within ASP.NET pages.
Short names: aspx-vb Filename patterns: *.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd Mimetypes: None
VbNetLexer
For Visual Basic.NET source code.
Short names: vb.net, vbnet Filename patterns: *.vb, *.bas Mimetypes: text/x-vbnet, text/x-vba
Simple lexer for Microsoft Visual FoxPro source code
FoxProLexer Lexer for Microsoft Visual FoxPro language.
FoxPro syntax allows to shorten all keywords and function names to 4 characters. Shortened forms are not recognized by this lexer.
New in Pygments 1.6.
Short names: Clipper, XBase Filename patterns: *.PRG, *.prg Mimetypes: None
Lexers for functional languages
CommonLispLexer
A Common Lisp lexer.
New in Pygments 0.9.
Short names: common-lisp, cl Filename patterns: *.cl, *.lisp, *.el Mimetypes: text/x-common-lisp
CoqLexer
For the Coq theorem prover.
New in Pygments 1.5.
Short names: coq Filename patterns: *.v Mimetypes: text/x-coq
ElixirConsoleLexer
For Elixir interactive console (iex) output like:
iex> [head | tail] = [1,2,3] [1,2,3] iex> head 1 iex> tail [2,3] iex> [head | tail] [1,2,3] iex> length [head | tail] 3New in Pygments 1.5.
Short names: iex Filename patterns: None Mimetypes: text/x-elixir-shellsession
ElixirLexer
For the Elixir language.
New in Pygments 1.5.
Short names: elixir, ex, exs Filename patterns: *.ex, *.exs Mimetypes: text/x-elixir
ErlangLexer
For the Erlang functional programming language.
Blame Jeremy Thurgood (http://jerith.za.net/).
New in Pygments 0.9.
Short names: erlang Filename patterns: *.erl, *.hrl, *.es, *.escript Mimetypes: text/x-erlang
ErlangShellLexer
Shell sessions in erl (for Erlang code).
New in Pygments 1.1.
Short names: erl Filename patterns: *.erl-sh Mimetypes: text/x-erl-shellsession
HaskellLexer
A Haskell lexer based on the lexemes defined in the Haskell 98 Report.
New in Pygments 0.8.
Short names: haskell, hs Filename patterns: *.hs Mimetypes: text/x-haskell
KokaLexer
Lexer for the Koka language.
New in Pygments 1.6.
Short names: koka Filename patterns: *.kk, *.kki Mimetypes: text/x-koka
LiterateHaskellLexer
For Literate Haskell (Bird-style or LaTeX) source.
Additional options accepted:
- litstyle
- If given, must be "bird" or "latex". If not given, the style is autodetected: if the first non-whitespace character in the source is a backslash or percent character, LaTeX is assumed, else Bird.
New in Pygments 0.9.
Short names: lhs, literate-haskell Filename patterns: *.lhs Mimetypes: text/x-literate-haskell
NewLispLexer
For newLISP. source code (version 10.3.0).
New in Pygments 1.5.
Short names: newlisp Filename patterns: *.lsp, *.nl Mimetypes: text/x-newlisp, application/x-newlisp
OcamlLexer
For the OCaml language.
New in Pygments 0.7.
Short names: ocaml Filename patterns: *.ml, *.mli, *.mll, *.mly Mimetypes: text/x-ocaml
OpaLexer
Lexer for the Opa language (http://opalang.org).
New in Pygments 1.5.
Short names: opa Filename patterns: *.opa Mimetypes: text/x-opa
RacketLexer
Lexer for Racket source code (formerly known as PLT Scheme).
New in Pygments 1.6.
Short names: racket, rkt Filename patterns: *.rkt, *.rktl Mimetypes: text/x-racket, application/x-racket
SMLLexer
For the Standard ML language.
New in Pygments 1.5.
Short names: sml Filename patterns: *.sml, *.sig, *.fun Mimetypes: text/x-standardml, application/x-standardml
SchemeLexer
A Scheme lexer, parsing a stream and outputting the tokens needed to highlight scheme code. This lexer could be most probably easily subclassed to parse other LISP-Dialects like Common Lisp, Emacs Lisp or AutoLisp.
This parser is checked with pastes from the LISP pastebin at http://paste.lisp.org/ to cover as much syntax as possible.
It supports the full Scheme syntax as defined in R5RS.
New in Pygments 0.6.
Short names: scheme, scm Filename patterns: *.scm, *.ss Mimetypes: text/x-scheme, application/x-scheme
Lexers for hardware descriptor languages
SystemVerilogLexer
Extends verilog lexer to recognise all SystemVerilog keywords from IEEE 1800-2009 standard.
New in Pygments 1.5.
Short names: sv Filename patterns: *.sv, *.svh Mimetypes: text/x-systemverilog
VerilogLexer
For verilog source code with preprocessor directives.
New in Pygments 1.4.
Short names: v Filename patterns: *.v Mimetypes: text/x-verilog
VhdlLexer
For VHDL source code.
New in Pygments 1.5.
Short names: vhdl Filename patterns: *.vhdl, *.vhd Mimetypes: text/x-vhdl
Pygments lexers for JVM languages
AspectJLexer
For AspectJ source code.
New in Pygments 1.6.
Short names: aspectj Filename patterns: *.aj Mimetypes: text/x-aspectj
CeylonLexer
For Ceylon source code.
New in Pygments 1.6.
Short names: ceylon Filename patterns: *.ceylon Mimetypes: text/x-ceylon
ClojureLexer
Lexer for Clojure source code.
New in Pygments 0.11.
Short names: clojure, clj Filename patterns: *.clj Mimetypes: text/x-clojure, application/x-clojure
GosuLexer
For Gosu source code.
New in Pygments 1.5.
Short names: gosu Filename patterns: *.gs, *.gsx, *.gsp, *.vark Mimetypes: text/x-gosu
GosuTemplateLexer
For Gosu templates.
New in Pygments 1.5.
Short names: gst Filename patterns: *.gst Mimetypes: text/x-gosu-template
GroovyLexer
For Groovy source code.
New in Pygments 1.5.
Short names: groovy Filename patterns: *.groovy Mimetypes: text/x-groovy
IokeLexer
For Ioke (a strongly typed, dynamic, prototype based programming language) source.
New in Pygments 1.4.
Short names: ioke, ik Filename patterns: *.ik Mimetypes: text/x-iokesrc
JavaLexer
For Java source code.
Short names: java Filename patterns: *.java Mimetypes: text/x-java
KotlinLexer
For Kotlin source code.
Additional options accepted:
- unicodelevel
Determines which Unicode characters this lexer allows for identifiers. The possible values are:
- none -- only the ASCII letters and numbers are allowed. This is the fastest selection.
- basic -- all Unicode characters from the specification except category Lo are allowed.
- full -- all Unicode characters as specified in the C# specs are allowed. Note that this means a considerable slowdown since the Lo category has more than 40,000 characters in it!
The default value is basic.
New in Pygments 1.5.
Short names: kotlin Filename patterns: *.kt Mimetypes: text/x-kotlin
ScalaLexer
For Scala source code.
Short names: scala Filename patterns: *.scala Mimetypes: text/x-scala
XtendLexer
For Xtend source code.
New in Pygments 1.6.
Short names: xtend Filename patterns: *.xtend Mimetypes: text/x-xtend
Lexers for math languages
BugsLexer
Pygments Lexer for OpenBugs and WinBugs models.
New in Pygments 1.6.
Short names: bugs, winbugs, openbugs Filename patterns: *.bug Mimetypes: None
IDLLexer
Pygments Lexer for IDL (Interactive Data Language).
New in Pygments 1.6.
Short names: idl Filename patterns: *.pro Mimetypes: text/idl
JagsLexer
Pygments Lexer for JAGS.
New in Pygments 1.6.
Short names: jags Filename patterns: *.jag, *.bug Mimetypes: None
JuliaConsoleLexer
For Julia console sessions. Modeled after MatlabSessionLexer.
New in Pygments 1.6.
Short names: jlcon Filename patterns: None Mimetypes: None
JuliaLexer
For Julia source code.
New in Pygments 1.6.
Short names: julia, jl Filename patterns: *.jl Mimetypes: text/x-julia, application/x-julia
MatlabLexer
For Matlab source code.
New in Pygments 0.10.
Short names: matlab Filename patterns: *.m Mimetypes: text/matlab
MatlabSessionLexer
For Matlab sessions. Modeled after PythonConsoleLexer. Contributed by Ken Schutte <kschutte@csail.mit.edu>.
New in Pygments 0.10.
Short names: matlabsession Filename patterns: None Mimetypes: None
MuPADLexer
A MuPAD lexer. Contributed by Christopher Creutzig <christopher@creutzig.de>.
New in Pygments 0.8.
Short names: mupad Filename patterns: *.mu Mimetypes: None
NumPyLexer
A Python lexer recognizing Numerical Python builtins.
New in Pygments 0.10.
Short names: numpy Filename patterns: None Mimetypes: None
OctaveLexer
For GNU Octave source code.
New in Pygments 1.5.
Short names: octave Filename patterns: *.m Mimetypes: text/octave
RConsoleLexer
For R console transcripts or R CMD BATCH output files.
Short names: rconsole, rout Filename patterns: *.Rout Mimetypes: None
RdLexer
Pygments Lexer for R documentation (Rd) files
This is a very minimal implementation, highlighting little more than the macros. A description of Rd syntax is found in Writing R Extensions and Parsing Rd files.
New in Pygments 1.6.
Short names: rd Filename patterns: *.Rd Mimetypes: text/x-r-doc
SLexer
For S, S-plus, and R source code.
New in Pygments 0.10.
Short names: splus, s, r Filename patterns: *.S, *.R, .Rhistory, .Rprofile Mimetypes: text/S-plus, text/S, text/x-r-source, text/x-r, text/x-R, text/x-r-history, text/x-r-profile
ScilabLexer
For Scilab source code.
New in Pygments 1.5.
Short names: scilab Filename patterns: *.sci, *.sce, *.tst Mimetypes: text/scilab
StanLexer
Pygments Lexer for Stan models.
New in Pygments 1.6.
Short names: stan Filename patterns: *.stan Mimetypes: None
Lexers for other languages
ABAPLexer
Lexer for ABAP, SAP's integrated language.
New in Pygments 1.1.
Short names: abap Filename patterns: *.abap Mimetypes: text/x-abap
AppleScriptLexer
For AppleScript source code, including AppleScript Studio. Contributed by Andreas Amann <aamann@mac.com>.
Short names: applescript Filename patterns: *.applescript Mimetypes: None
AsymptoteLexer
For Asymptote source code.
New in Pygments 1.2.
Short names: asy, asymptote Filename patterns: *.asy Mimetypes: text/x-asymptote
AutoItLexer
For AutoIt files.
AutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting
New in Pygments 1.6.
Short names: autoit, Autoit Filename patterns: *.au3 Mimetypes: text/x-autoit
AutohotkeyLexer
For autohotkey source code.
New in Pygments 1.4.
Short names: ahk Filename patterns: *.ahk, *.ahkl Mimetypes: text/x-autohotkey
AwkLexer
For Awk scripts.
New in Pygments 1.5.
Short names: awk, gawk, mawk, nawk Filename patterns: *.awk Mimetypes: application/x-awk
BefungeLexer
Lexer for the esoteric Befunge language.
New in Pygments 0.7.
Short names: befunge Filename patterns: *.befunge Mimetypes: application/x-befunge
BrainfuckLexer
Lexer for the esoteric BrainFuck language.
Short names: brainfuck, bf Filename patterns: *.bf, *.b Mimetypes: application/x-brainfuck
BroLexer
For Bro scripts.
New in Pygments 1.5.
Short names: bro Filename patterns: *.bro Mimetypes: None
CbmBasicV2Lexer
For CBM BASIC V2 sources.
New in Pygments 1.6.
Short names: cbmbas Filename patterns: *.bas Mimetypes: None
Cfengine3Lexer
Lexer for CFEngine3 policy files.
New in Pygments 1.5.
Short names: cfengine3, cf3 Filename patterns: *.cf Mimetypes: None
ECLLexer
Lexer for the declarative big-data ECL language.
New in Pygments 1.5.
Short names: ecl Filename patterns: *.ecl Mimetypes: application/x-ecl
GherkinLexer
For Gherkin <http://github.com/aslakhellesoy/gherkin/> syntax.
New in Pygments 1.2.
Short names: Cucumber, cucumber, Gherkin, gherkin Filename patterns: *.feature Mimetypes: text/x-gherkin
GnuplotLexer
For Gnuplot plotting scripts.
New in Pygments 0.11.
Short names: gnuplot Filename patterns: *.plot, *.plt Mimetypes: text/x-gnuplot
GoodDataCLLexer
Lexer for GoodData-CL script files.
New in Pygments 1.4.
Short names: gooddata-cl Filename patterns: *.gdc Mimetypes: text/x-gooddata-cl
HybrisLexer
For Hybris source code.
New in Pygments 1.4.
Short names: hybris, hy Filename patterns: *.hy, *.hyb Mimetypes: text/x-hybris, application/x-hybris
KconfigLexer
For Linux-style Kconfig files.
New in Pygments 1.6.
Short names: kconfig, menuconfig, linux-config, kernel-config Filename patterns: Kconfig, *Config.in*, external.in*, standard-modules.in Mimetypes: text/x-kconfig
LogtalkLexer
For Logtalk source code.
New in Pygments 0.10.
Short names: logtalk Filename patterns: *.lgt Mimetypes: text/x-logtalk
MOOCodeLexer
For MOOCode (the MOO scripting language).
New in Pygments 0.9.
Short names: moocode Filename patterns: *.moo Mimetypes: text/x-moocode
MaqlLexer
Lexer for GoodData MAQL scripts.
New in Pygments 1.4.
Short names: maql Filename patterns: *.maql Mimetypes: text/x-gooddata-maql, application/x-gooddata-maql
ModelicaLexer
For Modelica source code.
New in Pygments 1.1.
Short names: modelica Filename patterns: *.mo Mimetypes: text/x-modelica
MscgenLexer
For Mscgen files.
New in Pygments 1.6.
Short names: mscgen, msc Filename patterns: *.msc Mimetypes: None
NSISLexer
For NSIS scripts.
New in Pygments 1.6.
Short names: nsis, nsi, nsh Filename patterns: *.nsi, *.nsh Mimetypes: text/x-nsis
NewspeakLexer
For Newspeak <http://newspeaklanguage.org/> syntax.
Short names: newspeak Filename patterns: *.ns2 Mimetypes: text/x-newspeak
OpenEdgeLexer
Lexer for OpenEdge ABL (formerly Progress) source code.
New in Pygments 1.5.
Short names: openedge, abl, progress Filename patterns: *.p, *.cls Mimetypes: text/x-openedge, application/x-openedge
PostScriptLexer
Lexer for PostScript files.
The PostScript Language Reference published by Adobe at <http://partners.adobe.com/public/developer/en/ps/PLRM.pdf> is the authority for this.
New in Pygments 1.4.
Short names: postscript Filename patterns: *.ps, *.eps Mimetypes: application/postscript
PovrayLexer
For Persistence of Vision Raytracer files.
New in Pygments 0.11.
Short names: pov Filename patterns: *.pov, *.inc Mimetypes: text/x-povray
ProtoBufLexer
Lexer for Protocol Buffer definition files.
New in Pygments 1.4.
Short names: protobuf Filename patterns: *.proto Mimetypes: None
PuppetLexer
For Puppet configuration DSL.
New in Pygments 1.6.
Short names: puppet Filename patterns: *.pp Mimetypes: None
RPMSpecLexer
For RPM *.spec files
New in Pygments 1.6.
Short names: spec Filename patterns: *.spec Mimetypes: text/x-rpm-spec
RebolLexer
A REBOL lexer.
New in Pygments 1.1.
Short names: rebol Filename patterns: *.r, *.r3 Mimetypes: text/x-rebol
RedcodeLexer
A simple Redcode lexer based on ICWS'94. Contributed by Adam Blinkinsop <blinks@acm.org>.
New in Pygments 0.8.
Short names: redcode Filename patterns: *.cw Mimetypes: None
RobotFrameworkLexer
For Robot Framework test data.
Supports both space and pipe separated plain text formats.
New in Pygments 1.6.
Short names: RobotFramework, robotframework Filename patterns: *.txt Mimetypes: text/x-robotframework
SmalltalkLexer
For Smalltalk syntax. Contributed by Stefan Matthias Aust. Rewritten by Nils Winter.
New in Pygments 0.10.
Short names: smalltalk, squeak Filename patterns: *.st Mimetypes: text/x-smalltalk
SnobolLexer
Lexer for the SNOBOL4 programming language.
Recognizes the common ASCII equivalents of the original SNOBOL4 operators. Does not require spaces around binary operators.
New in Pygments 1.5.
Short names: snobol Filename patterns: *.snobol Mimetypes: text/x-snobol
SourcePawnLexer
For SourcePawn source code with preprocessor directives.
New in Pygments 1.6.
Short names: sp Filename patterns: *.sp Mimetypes: text/x-sourcepawn
UrbiscriptLexer
For UrbiScript source code.
New in Pygments 1.5.
Short names: urbiscript Filename patterns: *.u Mimetypes: application/x-urbiscript
VGLLexer
For SampleManager VGL source code.
New in Pygments 1.6.
Short names: vgl Filename patterns: *.rpf Mimetypes: None
Lexers for parser generators
AntlrActionScriptLexer
ANTLR with ActionScript Target
New in Pygments 1.1.
Short names: antlr-as, antlr-actionscript Filename patterns: *.G, *.g Mimetypes: None
AntlrCSharpLexer
ANTLR with C# Target
New in Pygments 1.1.
Short names: antlr-csharp, antlr-c# Filename patterns: *.G, *.g Mimetypes: None
AntlrCppLexer
ANTLR with CPP Target
New in Pygments 1.1.
Short names: antlr-cpp Filename patterns: *.G, *.g Mimetypes: None
AntlrJavaLexer
ANTLR with Java Target
New in Pygments 1.1
Short names: antlr-java Filename patterns: *.G, *.g Mimetypes: None
AntlrLexer
Generic ANTLR Lexer. Should not be called directly, instead use DelegatingLexer for your target language.
New in Pygments 1.1.
Short names: antlr Filename patterns: None Mimetypes: None
AntlrObjectiveCLexer
ANTLR with Objective-C Target
New in Pygments 1.1.
Short names: antlr-objc Filename patterns: *.G, *.g Mimetypes: None
AntlrPerlLexer
ANTLR with Perl Target
New in Pygments 1.1.
Short names: antlr-perl Filename patterns: *.G, *.g Mimetypes: None
AntlrPythonLexer
ANTLR with Python Target
New in Pygments 1.1.
Short names: antlr-python Filename patterns: *.G, *.g Mimetypes: None
AntlrRubyLexer
ANTLR with Ruby Target
New in Pygments 1.1.
Short names: antlr-ruby, antlr-rb Filename patterns: *.G, *.g Mimetypes: None
RagelCLexer
A lexer for Ragel in a C host file.
New in Pygments 1.1.
Short names: ragel-c Filename patterns: *.rl Mimetypes: None
RagelCppLexer
A lexer for Ragel in a CPP host file.
New in Pygments 1.1.
Short names: ragel-cpp Filename patterns: *.rl Mimetypes: None
RagelDLexer
A lexer for Ragel in a D host file.
New in Pygments 1.1.
Short names: ragel-d Filename patterns: *.rl Mimetypes: None
RagelEmbeddedLexer
A lexer for Ragel embedded in a host language file.
This will only highlight Ragel statements. If you want host language highlighting then call the language-specific Ragel lexer.
New in Pygments 1.1.
Short names: ragel-em Filename patterns: *.rl Mimetypes: None
RagelJavaLexer
A lexer for Ragel in a Java host file.
New in Pygments 1.1.
Short names: ragel-java Filename patterns: *.rl Mimetypes: None
RagelLexer
A pure Ragel lexer. Use this for fragments of Ragel. For .rl files, use RagelEmbeddedLexer instead (or one of the language-specific subclasses).
New in Pygments 1.1.
Short names: ragel Filename patterns: None Mimetypes: None
RagelObjectiveCLexer
A lexer for Ragel in an Objective C host file.
New in Pygments 1.1.
Short names: ragel-objc Filename patterns: *.rl Mimetypes: None
RagelRubyLexer
A lexer for Ragel in a Ruby host file.
New in Pygments 1.1.
Short names: ragel-ruby, ragel-rb Filename patterns: *.rl Mimetypes: None
TreetopLexer
A lexer for Treetop grammars.
New in Pygments 1.6.
Short names: treetop Filename patterns: *.treetop, *.tt Mimetypes: None
Lexers for various shells
BashLexer
Lexer for (ba|k|)sh shell scripts.
New in Pygments 0.6.
Short names: bash, sh, ksh Filename patterns: *.sh, *.ksh, *.bash, *.ebuild, *.eclass, .bashrc, bashrc, .bash\*, bash\* Mimetypes: application/x-sh, application/x-shellscript
BashSessionLexer
Lexer for simplistic shell sessions.
New in Pygments 1.1.
Short names: console Filename patterns: *.sh-session Mimetypes: application/x-shell-session
BatchLexer
Lexer for the DOS/Windows Batch file format.
New in Pygments 0.7.
Short names: bat Filename patterns: *.bat, *.cmd Mimetypes: application/x-dos-batch
PowerShellLexer
For Windows PowerShell code.
New in Pygments 1.5.
Short names: powershell, posh, ps1 Filename patterns: *.ps1 Mimetypes: text/x-powershell
TcshLexer
Lexer for tcsh scripts.
New in Pygments 0.10.
Short names: tcsh, csh Filename patterns: *.tcsh, *.csh Mimetypes: application/x-csh
Special lexers
RawTokenLexer
Recreate a token stream formatted with the RawTokenFormatter. This lexer raises exceptions during parsing if the token stream in the file is malformed.
Additional options accepted:
- compress
- If set to "gz" or "bz2", decompress the token stream with the given compression algorithm before lexing (default: "").
Short names: raw Filename patterns: None Mimetypes: application/x-pygments-tokens
TextLexer
"Null" lexer, doesn't highlight anything.
Short names: text Filename patterns: *.txt Mimetypes: text/plain
Lexers for various template engines' markup
CheetahHtmlLexer
Subclass of the CheetahLexer that highlights unlexer data with the HtmlLexer.
Short names: html+cheetah, html+spitfire Filename patterns: None Mimetypes: text/html+cheetah, text/html+spitfire
CheetahJavascriptLexer
Subclass of the CheetahLexer that highlights unlexer data with the JavascriptLexer.
Short names: js+cheetah, javascript+cheetah, js+spitfire, javascript+spitfire Filename patterns: None Mimetypes: application/x-javascript+cheetah, text/x-javascript+cheetah, text/javascript+cheetah, application/x-javascript+spitfire, text/x-javascript+spitfire, text/javascript+spitfire
CheetahLexer
Generic cheetah templates lexer. Code that isn't Cheetah markup is yielded as Token.Other. This also works for spitfire templates which use the same syntax.
Short names: cheetah, spitfire Filename patterns: *.tmpl, *.spt Mimetypes: application/x-cheetah, application/x-spitfire
CheetahXmlLexer
Subclass of the CheetahLexer that highlights unlexer data with the XmlLexer.
Short names: xml+cheetah, xml+spitfire Filename patterns: None Mimetypes: application/xml+cheetah, application/xml+spitfire
ColdfusionHtmlLexer
Coldfusion markup in html
Short names: cfm Filename patterns: *.cfm, *.cfml, *.cfc Mimetypes: application/x-coldfusion
ColdfusionLexer
Coldfusion statements
Short names: cfs Filename patterns: None Mimetypes: None
CssDjangoLexer
Subclass of the DjangoLexer that highlights unlexed data with the CssLexer.
Short names: css+django, css+jinja Filename patterns: None Mimetypes: text/css+django, text/css+jinja
CssErbLexer
Subclass of ErbLexer which highlights unlexed data with the CssLexer.
Short names: css+erb, css+ruby Filename patterns: None Mimetypes: text/css+ruby
CssGenshiLexer
A lexer that highlights CSS definitions in genshi text templates.
Short names: css+genshitext, css+genshi Filename patterns: None Mimetypes: text/css+genshi
CssPhpLexer
Subclass of PhpLexer which highlights unmatched data with the CssLexer.
Short names: css+php Filename patterns: None Mimetypes: text/css+php
CssSmartyLexer
Subclass of the SmartyLexer that highlights unlexed data with the CssLexer.
Short names: css+smarty Filename patterns: None Mimetypes: text/css+smarty
DjangoLexer
Generic django and jinja template lexer.
It just highlights django/jinja code between the preprocessor directives, other data is left untouched by the lexer.
Short names: django, jinja Filename patterns: None Mimetypes: application/x-django-templating, application/x-jinja
ErbLexer
Generic ERB (Ruby Templating) lexer.
Just highlights ruby code between the preprocessor directives, other data is left untouched by the lexer.
All options are also forwarded to the RubyLexer.
Short names: erb Filename patterns: None Mimetypes: application/x-ruby-templating
EvoqueHtmlLexer
Subclass of the EvoqueLexer that highlights unlexed data with the HtmlLexer.
New in Pygments 1.1.
Short names: html+evoque Filename patterns: *.html Mimetypes: text/html+evoque
EvoqueLexer
For files using the Evoque templating system.
New in Pygments 1.1.
Short names: evoque Filename patterns: *.evoque Mimetypes: application/x-evoque
EvoqueXmlLexer
Subclass of the EvoqueLexer that highlights unlexed data with the XmlLexer.
New in Pygments 1.1.
Short names: xml+evoque Filename patterns: *.xml Mimetypes: application/xml+evoque
GenshiLexer
A lexer that highlights genshi and kid kid XML templates.
Short names: genshi, kid, xml+genshi, xml+kid Filename patterns: *.kid Mimetypes: application/x-genshi, application/x-kid
GenshiTextLexer
A lexer that highlights genshi text templates.
Short names: genshitext Filename patterns: None Mimetypes: application/x-genshi-text, text/x-genshi
HtmlDjangoLexer
Subclass of the DjangoLexer that highighlights unlexed data with the HtmlLexer.
Nested Javascript and CSS is highlighted too.
Short names: html+django, html+jinja Filename patterns: None Mimetypes: text/html+django, text/html+jinja
HtmlGenshiLexer
A lexer that highlights genshi and kid kid HTML templates.
Short names: html+genshi, html+kid Filename patterns: None Mimetypes: text/html+genshi
HtmlPhpLexer
Subclass of PhpLexer that highlights unhandled data with the HtmlLexer.
Nested Javascript and CSS is highlighted too.
Short names: html+php Filename patterns: *.phtml Mimetypes: application/x-php, application/x-httpd-php, application/x-httpd-php3, application/x-httpd-php4, application/x-httpd-php5
HtmlSmartyLexer
Subclass of the SmartyLexer that highighlights unlexed data with the HtmlLexer.
Nested Javascript and CSS is highlighted too.
Short names: html+smarty Filename patterns: None Mimetypes: text/html+smarty
JavascriptDjangoLexer
Subclass of the DjangoLexer that highlights unlexed data with the JavascriptLexer.
Short names: js+django, javascript+django, js+jinja, javascript+jinja Filename patterns: None Mimetypes: application/x-javascript+django, application/x-javascript+jinja, text/x-javascript+django, text/x-javascript+jinja, text/javascript+django, text/javascript+jinja
JavascriptErbLexer
Subclass of ErbLexer which highlights unlexed data with the JavascriptLexer.
Short names: js+erb, javascript+erb, js+ruby, javascript+ruby Filename patterns: None Mimetypes: application/x-javascript+ruby, text/x-javascript+ruby, text/javascript+ruby
JavascriptGenshiLexer
A lexer that highlights javascript code in genshi text templates.
Short names: js+genshitext, js+genshi, javascript+genshitext, javascript+genshi Filename patterns: None Mimetypes: application/x-javascript+genshi, text/x-javascript+genshi, text/javascript+genshi
JavascriptPhpLexer
Subclass of PhpLexer which highlights unmatched data with the JavascriptLexer.
Short names: js+php, javascript+php Filename patterns: None Mimetypes: application/x-javascript+php, text/x-javascript+php, text/javascript+php
JavascriptSmartyLexer
Subclass of the SmartyLexer that highlights unlexed data with the JavascriptLexer.
Short names: js+smarty, javascript+smarty Filename patterns: None Mimetypes: application/x-javascript+smarty, text/x-javascript+smarty, text/javascript+smarty
JspLexer
Lexer for Java Server Pages.
New in Pygments 0.7.
Short names: jsp Filename patterns: *.jsp Mimetypes: application/x-jsp
LassoCssLexer
Subclass of the LassoLexer which highlights unhandled data with the CssLexer.
New in Pygments 1.6.
Short names: css+lasso Filename patterns: None Mimetypes: text/css+lasso
LassoHtmlLexer
Subclass of the LassoLexer which highlights unhandled data with the HtmlLexer.
Nested JavaScript and CSS is also highlighted.
New in Pygments 1.6.
Short names: html+lasso Filename patterns: None Mimetypes: text/html+lasso, application/x-httpd-lasso, application/x-httpd-lasso[89]
LassoJavascriptLexer
Subclass of the LassoLexer which highlights unhandled data with the JavascriptLexer.
New in Pygments 1.6.
Short names: js+lasso, javascript+lasso Filename patterns: None Mimetypes: application/x-javascript+lasso, text/x-javascript+lasso, text/javascript+lasso
LassoXmlLexer
Subclass of the LassoLexer which highlights unhandled data with the XmlLexer.
New in Pygments 1.6.
Short names: xml+lasso Filename patterns: None Mimetypes: application/xml+lasso
MakoCssLexer
Subclass of the MakoLexer that highlights unlexer data with the CssLexer.
New in Pygments 0.7.
Short names: css+mako Filename patterns: None Mimetypes: text/css+mako
MakoHtmlLexer
Subclass of the MakoLexer that highlights unlexed data with the HtmlLexer.
New in Pygments 0.7.
Short names: html+mako Filename patterns: None Mimetypes: text/html+mako
MakoJavascriptLexer
Subclass of the MakoLexer that highlights unlexer data with the JavascriptLexer.
New in Pygments 0.7.
Short names: js+mako, javascript+mako Filename patterns: None Mimetypes: application/x-javascript+mako, text/x-javascript+mako, text/javascript+mako
MakoLexer
Generic mako templates lexer. Code that isn't Mako markup is yielded as Token.Other.
New in Pygments 0.7.
Short names: mako Filename patterns: *.mao Mimetypes: application/x-mako
MakoXmlLexer
Subclass of the MakoLexer that highlights unlexer data with the XmlLexer.
New in Pygments 0.7.
Short names: xml+mako Filename patterns: None Mimetypes: application/xml+mako
MasonLexer
Generic mason templates lexer. Stolen from Myghty lexer. Code that isn't Mason markup is HTML.
New in Pygments 1.4.
Short names: mason Filename patterns: *.m, *.mhtml, *.mc, *.mi, autohandler, dhandler Mimetypes: application/x-mason
MyghtyCssLexer
Subclass of the MyghtyLexer that highlights unlexer data with the CssLexer.
New in Pygments 0.6.
Short names: css+myghty Filename patterns: None Mimetypes: text/css+myghty
MyghtyHtmlLexer
Subclass of the MyghtyLexer that highlights unlexer data with the HtmlLexer.
New in Pygments 0.6.
Short names: html+myghty Filename patterns: None Mimetypes: text/html+myghty
MyghtyJavascriptLexer
Subclass of the MyghtyLexer that highlights unlexer data with the JavascriptLexer.
New in Pygments 0.6.
Short names: js+myghty, javascript+myghty Filename patterns: None Mimetypes: application/x-javascript+myghty, text/x-javascript+myghty, text/javascript+mygthy
MyghtyLexer
Generic myghty templates lexer. Code that isn't Myghty markup is yielded as Token.Other.
New in Pygments 0.6.
Short names: myghty Filename patterns: *.myt, autodelegate Mimetypes: application/x-myghty
MyghtyXmlLexer
Subclass of the MyghtyLexer that highlights unlexer data with the XmlLexer.
New in Pygments 0.6.
Short names: xml+myghty Filename patterns: None Mimetypes: application/xml+myghty
RhtmlLexer
Subclass of the ERB lexer that highlights the unlexed data with the html lexer.
Nested Javascript and CSS is highlighted too.
Short names: rhtml, html+erb, html+ruby Filename patterns: *.rhtml Mimetypes: text/html+ruby
SmartyLexer
Generic Smarty template lexer.
Just highlights smarty code between the preprocessor directives, other data is left untouched by the lexer.
Short names: smarty Filename patterns: *.tpl Mimetypes: application/x-smarty
SspLexer
Lexer for Scalate Server Pages.
New in Pygments 1.4.
Short names: ssp Filename patterns: *.ssp Mimetypes: application/x-ssp
TeaTemplateLexer
Lexer for Tea Templates.
New in Pygments 1.5.
Short names: tea Filename patterns: *.tea Mimetypes: text/x-tea
VelocityHtmlLexer
Subclass of the VelocityLexer that highlights unlexer data with the HtmlLexer.
Short names: html+velocity Filename patterns: None Mimetypes: text/html+velocity
VelocityLexer
Generic Velocity template lexer.
Just highlights velocity directives and variable references, other data is left untouched by the lexer.
Short names: velocity Filename patterns: *.vm, *.fhtml Mimetypes: None
VelocityXmlLexer
Subclass of the VelocityLexer that highlights unlexer data with the XmlLexer.
Short names: xml+velocity Filename patterns: None Mimetypes: application/xml+velocity
XmlDjangoLexer
Subclass of the DjangoLexer that highlights unlexed data with the XmlLexer.
Short names: xml+django, xml+jinja Filename patterns: None Mimetypes: application/xml+django, application/xml+jinja
XmlErbLexer
Subclass of ErbLexer which highlights data outside preprocessor directives with the XmlLexer.
Short names: xml+erb, xml+ruby Filename patterns: None Mimetypes: application/xml+ruby
XmlPhpLexer
Subclass of PhpLexer that higlights unhandled data with the XmlLexer.
Short names: xml+php Filename patterns: None Mimetypes: application/xml+php
XmlSmartyLexer
Subclass of the SmartyLexer that highlights unlexed data with the XmlLexer.
Short names: xml+smarty Filename patterns: None Mimetypes: application/xml+smarty
Lexers for non-source code file types
ApacheConfLexer
Lexer for configuration files following the Apache config file format.
New in Pygments 0.6.
Short names: apacheconf, aconf, apache Filename patterns: .htaccess, apache.conf, apache2.conf Mimetypes: text/x-apacheconf
BBCodeLexer
A lexer that highlights BBCode(-like) syntax.
New in Pygments 0.6.
Short names: bbcode Filename patterns: None Mimetypes: text/x-bbcode
BaseMakefileLexer
Lexer for simple Makefiles (no preprocessing).
New in Pygments 0.10.
Short names: basemake Filename patterns: None Mimetypes: None
CMakeLexer
Lexer for CMake files.
New in Pygments 1.2.
Short names: cmake Filename patterns: *.cmake, CMakeLists.txt Mimetypes: text/x-cmake
DarcsPatchLexer
DarcsPatchLexer is a lexer for the various versions of the darcs patch format. Examples of this format are derived by commands such as darcs annotate --patch and darcs send.
New in Pygments 0.10.
Short names: dpatch Filename patterns: *.dpatch, *.darcspatch Mimetypes: None
DebianControlLexer
Lexer for Debian control files and apt-cache show <pkg> outputs.
New in Pygments 0.9.
Short names: control Filename patterns: control Mimetypes: None
DiffLexer
Lexer for unified or context-style diffs or patches.
Short names: diff, udiff Filename patterns: *.diff, *.patch Mimetypes: text/x-diff, text/x-patch
GettextLexer
Lexer for Gettext catalog files.
New in Pygments 0.9.
Short names: pot, po Filename patterns: *.pot, *.po Mimetypes: application/x-gettext, text/x-gettext, text/gettext
GroffLexer
Lexer for the (g)roff typesetting language, supporting groff extensions. Mainly useful for highlighting manpage sources.
New in Pygments 0.6.
Short names: groff, nroff, man Filename patterns: *.[1234567], *.man Mimetypes: application/x-troff, text/troff
HttpLexer
Lexer for HTTP sessions.
New in Pygments 1.5.
Short names: http Filename patterns: None Mimetypes: None
HxmlLexer
Lexer for haXe build files.
New in Pygments 1.6.
Short names: haxeml, hxml Filename patterns: *.hxml Mimetypes: None
IniLexer
Lexer for configuration files in INI style.
Short names: ini, cfg Filename patterns: *.ini, *.cfg Mimetypes: text/x-ini
IrcLogsLexer
Lexer for IRC logs in irssi, xchat or weechat style.
Short names: irc Filename patterns: *.weechatlog Mimetypes: text/x-irclog
LighttpdConfLexer
Lexer for Lighttpd configuration files.
New in Pygments 0.11.
Short names: lighty, lighttpd Filename patterns: None Mimetypes: text/x-lighttpd-conf
MakefileLexer
Lexer for BSD and GNU make extensions (lenient enough to handle both in the same file even).
Rewritten in Pygments 0.10.
Short names: make, makefile, mf, bsdmake Filename patterns: *.mak, Makefile, makefile, Makefile.*, GNUmakefile Mimetypes: text/x-makefile
MoinWikiLexer
For MoinMoin (and Trac) Wiki markup.
New in Pygments 0.7.
Short names: trac-wiki, moin Filename patterns: None Mimetypes: text/x-trac-wiki
NginxConfLexer
Lexer for Nginx configuration files.
New in Pygments 0.11.
Short names: nginx Filename patterns: None Mimetypes: text/x-nginx-conf
PropertiesLexer
Lexer for configuration files in Java's properties format.
New in Pygments 1.4.
Short names: properties Filename patterns: *.properties Mimetypes: text/x-java-properties
PyPyLogLexer
Lexer for PyPy log files.
New in Pygments 1.5.
Short names: pypylog, pypy Filename patterns: *.pypylog Mimetypes: application/x-pypylog
RegeditLexer
Lexer for Windows Registry files produced by regedit.
New in Pygments 1.6.
Short names: None Filename patterns: *.reg Mimetypes: text/x-windows-registry
RstLexer
For reStructuredText markup.
New in Pygments 0.7.
Additional options accepted:
- handlecodeblocks
- Highlight the contents of .. sourcecode:: langauge and .. code:: language directives with a lexer for the given language (default: True). New in Pygments 0.8.
Short names: rst, rest, restructuredtext Filename patterns: *.rst, *.rest Mimetypes: text/x-rst, text/prs.fallenstein.rst
SourcesListLexer
Lexer that highlights debian sources.list files.
New in Pygments 0.7.
Short names: sourceslist, sources.list Filename patterns: sources.list Mimetypes: None
SquidConfLexer
Lexer for squid configuration files.
New in Pygments 0.9.
Short names: squidconf, squid.conf, squid Filename patterns: squid.conf Mimetypes: text/x-squidconf
TexLexer
Lexer for the TeX and LaTeX typesetting languages.
Short names: tex, latex Filename patterns: *.tex, *.aux, *.toc Mimetypes: text/x-tex, text/x-latex
VimLexer
Lexer for VimL script files.
New in Pygments 0.8.
Short names: vim Filename patterns: *.vim, .vimrc, .exrc, .gvimrc, vimrc, exrc, gvimrc, vimrc, gvimrc Mimetypes: text/x-vim
YamlLexer
Lexer for YAML, a human-friendly data serialization language.
New in Pygments 0.11.
Short names: yaml Filename patterns: *.yaml, *.yml Mimetypes: text/x-yaml
Iterating over all lexers
New in Pygments 0.6.
To get all lexers (both the builtin and the plugin ones), you can use the get_all_lexers() function from the pygments.lexers module:
>>> from pygments.lexers import get_all_lexers >>> i = get_all_lexers() >>> i.next() ('Diff', ('diff',), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch')) >>> i.next() ('Delphi', ('delphi', 'objectpascal', 'pas', 'pascal'), ('*.pas',), ('text/x-pascal',)) >>> i.next() ('XML+Ruby', ('xml+erb', 'xml+ruby'), (), ())
As you can see, the return value is an iterator which yields tuples in the form (name, aliases, filetypes, mimetypes).