1. 支持代码高亮的语言

包括高级语言、模版语言、标记语言,共434个

格式 短名
ABAP abap
ABNF abnf
ActionScript 3 as3, actionscript3
ActionScript as, actionscript
Ada ada, ada95, ada2005
ADL adl
Agda agda
Aheui aheui
Alloy alloy
AmbientTalk at, ambienttalk, ambienttalk/2
Ampl ampl
Angular2 ng2
ANTLR With ActionScript Target antlr-as, antlr-actionscript
ANTLR With C# Target antlr-csharp, antlr-c#
ANTLR With CPP Target antlr-cpp
ANTLR With Java Target antlr-java
ANTLR With ObjectiveC Target antlr-objc
ANTLR With Perl Target antlr-perl
ANTLR With Python Target antlr-python
ANTLR With Ruby Target antlr-ruby, antlr-rb
ANTLR antlr
ApacheConf apacheconf, aconf, apache
APL apl
AppleScript applescript
Arduino arduino
AspectJ aspectj
aspx-cs aspx-cs
aspx-vb aspx-vb
Asymptote asy, asymptote
autohotkey ahk, autohotkey
AutoIt autoit
Awk awk, gawk, mawk, nawk
Base Makefile basemake
Bash Session console, shell-session
Bash bash, sh, ksh, zsh, shell
Batchfile bat, batch, dosbatch, winbatch
BBCode bbcode
BC bc
Befunge befunge
BibTeX bib, bibtex
BlitzBasic blitzbasic, b3d, bplus
BlitzMax blitzmax, bmax
BNF bnf
Boo boo
Boogie boogie
Brainfuck brainfuck, bf
Bro bro
BST bst, bst-pybtex
BUGS bugs, winbugs, openbugs
C c
C# csharp, c#
C++ cpp, c++
c-objdump c-objdump
ca65 assembler ca65
cADL cadl
CAmkES camkes, idl4
Cap'n Proto capnp
CapDL capdl
CBM BASIC V2 cbmbas
Ceylon ceylon
CFEngine3 cfengine3, cf3
cfstatement cfs
ChaiScript chai, chaiscript
Chapel chapel, chpl
Cheetah cheetah, spitfire
Cirru cirru
Clay clay
Clean clean
Clojure clojure, clj
ClojureScript clojurescript, cljs
CMake cmake
COBOL cobol
COBOLFree cobolfree
CoffeeScript coffee-script, coffeescript, coffee
Coldfusion CFC cfc
Coldfusion HTML cfm
Common Lisp common-lisp, cl, lisp
Component Pascal componentpascal, cp
Coq coq
cpp-objdump cpp-objdump, c++-objdumb, cxx-objdump
CPSA cpsa
Crmsh crmsh, pcmk
Croc croc
Cryptol cryptol, cry
Crystal cr, crystal
Csound Document csound-document, csound-csd
Csound Orchestra csound, csound-orc
Csound Score csound-score, csound-sco
CSS css
CSS+Django/Jinja css+django, css+jinja
CSS+Genshi Text css+genshitext, css+genshi
CSS+Lasso css+lasso
CSS+Mako css+mako
CSS+mozpreproc css+mozpreproc
CSS+Myghty css+myghty
CSS+PHP css+php
CSS+Ruby css+erb, css+ruby
CSS+Smarty css+smarty
CUDA cuda, cu
Cypher cypher
Cython cython, pyx, pyrex
D d
d-objdump d-objdump
Darcs Patch dpatch
Dart dart
Debian Control file control, debcontrol
Debian Sourcelist sourceslist, sources.list, debsources
Delphi delphi, pas, pascal, objectpascal
dg dg
Diff diff, udiff
Django/Jinja django, jinja
Docker docker, dockerfile
DTD dtd
Duel duel, jbst, jsonml+bst
Dylan session dylan-console, dylan-repl
Dylan dylan
DylanLID dylan-lid, lid
Earl Grey earl-grey, earlgrey, eg
Easytrieve easytrieve
EBNF ebnf
eC ec
ECL ecl
Eiffel eiffel
Elixir iex session iex
Elixir elixir, ex, exs
Elm elm
EmacsLisp emacs, elisp, emacs-lisp
Embedded Ragel ragel-em
ERB erb
Erlang erl session erl
Erlang erlang
Evoque evoque
Ezhil ezhil
Factor factor
Fancy fancy, fy
Fantom fan
Felix felix, flx
Fish fish, fishshell
Flatline flatline
Forth forth
Fortran fortran
FortranFixed fortranfixed
FoxPro foxpro, vfp, clipper, xbase
FSharp fsharp
GAP gap
GAS gas, asm
Genshi Text genshitext
Genshi genshi, kid, xml+genshi, xml+kid
Gettext Catalog pot, po
Gherkin cucumber, gherkin
GLSL glsl
Gnuplot gnuplot
Go go
Golo golo
GoodData-CL gooddata-cl
Gosu Template gst
Gosu gosu
Groff groff, nroff, man
Groovy groovy
Haml haml
Handlebars handlebars
Haskell haskell, hs
Haxe hx, haxe, hxsl
Hexdump hexdump
HSAIL hsail, hsa
HTML + Angular2 html+ng2
HTML html
HTML+Cheetah html+cheetah, html+spitfire, htmlcheetah
HTML+Django/Jinja html+django, html+jinja, htmldjango
HTML+Evoque html+evoque
HTML+Genshi html+genshi, html+kid
HTML+Handlebars html+handlebars
HTML+Lasso html+lasso
HTML+Mako html+mako
HTML+Myghty html+myghty
HTML+PHP html+php
HTML+Smarty html+smarty
HTML+Twig html+twig
HTML+Velocity html+velocity
HTTP http
Hxml haxeml, hxml
Hy hylang
Hybris hybris, hy
IDL idl
Idris idris, idr
Igor igor, igorpro
Inform 6 template i6t
Inform 6 inform6, i6
Inform 7 inform7, i7
INI ini, cfg, dosini
Io io
Ioke ioke, ik
IRC logs irc
Isabelle isabelle
J j
JAGS jags
Jasmin jasmin, jasminxt
Java Server Page jsp
Java java
JavaScript js, javascript
JavaScript+Cheetah js+cheetah, javascript+cheetah, js+spitfire, javascript+spitfire
JavaScript+Django/Jinja js+django, javascript+django, js+jinja, javascript+jinja
JavaScript+Genshi Text js+genshitext, js+genshi, javascript+genshitext, javascript+genshi
JavaScript+Lasso js+lasso, javascript+lasso
JavaScript+Mako js+mako, javascript+mako
Javascript+mozpreproc javascript+mozpreproc
JavaScript+Myghty js+myghty, javascript+myghty
JavaScript+PHP js+php, javascript+php
JavaScript+Ruby js+erb, javascript+erb, js+ruby, javascript+ruby
JavaScript+Smarty js+smarty, javascript+smarty
JCL jcl
JSGF jsgf
JSON json
JSON-LD jsonld, json-ld
JSONBareObject json-object
Julia console jlcon
Julia julia, jl
Juttle juttle, juttle
Kal kal
Kconfig kconfig, menuconfig, linux-config, kernel-config
Koka koka
Kotlin kotlin
Lasso lasso, lassoscript
Lean lean
LessCss less
Lighttpd configuration file lighty, lighttpd
Limbo limbo
liquid liquid
Literate Agda lagda, literate-agda
Literate Cryptol lcry, literate-cryptol, lcryptol
Literate Haskell lhs, literate-haskell, lhaskell
Literate Idris lidr, literate-idris, lidris
LiveScript live-script, livescript
LLVM llvm
Logos logos
Logtalk logtalk
LSL lsl
Lua lua
Makefile make, makefile, mf, bsdmake
Mako mako
MAQL maql
markdown md
Mask mask
Mason mason
Mathematica mathematica, mma, nb
Matlab session matlabsession
Matlab matlab
MiniD minid
Modelica modelica
Modula-2 modula2, m2
MoinMoin/Trac Wiki markup trac-wiki, moin
Monkey monkey
Monte monte
MOOCode moocode, moo
MoonScript moon, moonscript
mozhashpreproc mozhashpreproc
mozpercentpreproc mozpercentpreproc
MQL mql, mq4, mq5, mql4, mql5
Mscgen mscgen, msc
MSDOS Session doscon
MuPAD mupad
MXML mxml
Myghty myghty
MySQL mysql
NASM nasm
NCL ncl
Nemerle nemerle
nesC nesc
NewLisp newlisp
Newspeak newspeak
Nginx configuration file nginx
Nimrod nim, nimrod
Nit nit
Nix nixos, nix
NSIS nsis, nsi, nsh
NumPy numpy
NuSMV nusmv
objdump objdump
objdump-nasm objdump-nasm
Objective-C objective-c, objectivec, obj-c, objc
Objective-C++ objective-c++, objectivec++, obj-c++, objc++
Objective-J objective-j, objectivej, obj-j, objj
OCaml ocaml
Octave octave
ODIN odin
Ooc ooc
Opa opa
OpenEdge ABL openedge, abl, progress
PacmanConf pacmanconf
Pan pan
ParaSail parasail
Pawn pawn
Perl perl, pl
Perl6 perl6, pl6
PHP php, php3, php4, php5
Pig pig
Pike pike
PkgConfig pkgconfig
PL/pgSQL plpgsql
PostgreSQL console (psql) psql, postgresql-console, postgres-console
PostgreSQL SQL dialect postgresql, postgres
PostScript postscript, postscr
POVRay pov
PowerShell Session ps1con
PowerShell powershell, posh, ps1, psm1
Praat praat
Prolog prolog
Properties properties, jproperties
Protocol Buffer protobuf, proto
Pug pug, jade
Puppet puppet
PyPy Log pypylog, pypy
Python 3 python3, py3
Python 3.0 Traceback py3tb
Python console session pycon
Python Traceback pytb
Python python, py, sage
QBasic qbasic, basic
QML qml, qbs
QVTO qvto, qvt
Racket racket, rkt
Ragel in C Host ragel-c
Ragel in CPP Host ragel-cpp
Ragel in D Host ragel-d
Ragel in Java Host ragel-java
Ragel in Objective C Host ragel-objc
Ragel in Ruby Host ragel-ruby, ragel-rb
Ragel ragel
Raw token data raw
RConsole rconsole, rout
Rd rd
REBOL rebol
Red red, red/system
Redcode redcode
reg registry
Relax-NG Compact rnc, rng-compact
ResourceBundle resource, resourcebundle
reStructuredText rst, rest, restructuredtext
Rexx rexx, arexx
RHTML rhtml, html+erb, html+ruby
Roboconf Graph roboconf-graph
Roboconf Instances roboconf-instances
RobotFramework robotframework
RPMSpec spec
RQL rql
RSL rsl
Ruby irb session rbcon, irb
Ruby rb, ruby, duby
Rust rust
S splus, s, r
SAS sas
Sass sass
Scala scala
Scalate Server Page ssp
Scaml scaml
Scheme scheme, scm
Scilab scilab
SCSS scss
Shen shen
Silver silver
Slim slim
Smali smali
Smalltalk smalltalk, squeak, st
Smarty smarty
Snobol snobol
Snowball snowball
SourcePawn sp
SPARQL sparql
SQL sql
sqlite3con sqlite3
SquidConf squidconf, squid.conf, squid
Stan stan
Standard ML sml
Stata stata, do
SuperCollider sc, supercollider
Swift swift
SWIG swig
systemverilog systemverilog, sv
TADS 3 tads3
TAP tap
TASM tasm
Tcl tcl
Tcsh Session tcshcon
Tcsh tcsh, csh
Tea tea
Termcap termcap
Terminfo terminfo
Terraform terraform, tf
TeX tex, latex
Text only text
Thrift thrift
Todotxt todotxt
TrafficScript rts, trafficscript
Transact-SQL tsql, t-sql
Treetop treetop
Turtle turtle
Twig twig
TypeScript ts, typescript
TypoScript typoscript
TypoScriptCssData typoscriptcssdata
TypoScriptHtmlData typoscripthtmldata
UrbiScript urbiscript
Vala vala, vapi
VB.net vb.net, vbnet
VCL vcl
VCLSnippets vclsnippets, vclsnippet
VCTreeStatus vctreestatus
Velocity velocity
verilog verilog, v
VGL vgl
vhdl vhdl
VimL vim
WDiff wdiff
Whiley whiley
X10 x10, xten
XML xml
XML+Cheetah xml+cheetah, xml+spitfire
XML+Django/Jinja xml+django, xml+jinja
XML+Evoque xml+evoque
XML+Lasso xml+lasso
XML+Mako xml+mako
XML+Myghty xml+myghty
XML+PHP xml+php
XML+Ruby xml+erb, xml+ruby
XML+Smarty xml+smarty
XML+Velocity xml+velocity
XQuery xquery, xqy, xq, xql, xqm
XSLT xslt
Xtend xtend
xtlang extempore
XUL+mozpreproc xul+mozpreproc
YAML yaml
YAML+Jinja yaml+jinja, salt, sls
Zephir zephir

说明

  1. 逗号分隔表示任选一种均可

  2. 底层实际是由Pygments的lexers所实现,上述表格中的Pygments版本是2.2.0,支持共434种语言、模版、标记语言。

  3. 只要是依赖Pygments实现的语法高亮,上述表格里的均可以使用

  4. 上述表格不是从pygments的官网上找到的,因为官网已经很久没更新这个表格了(http://pygments.org/languages/,连go语言都没写出来),所以我是直接从pygments源代码(pygments/lexers/_mapping.py)里搜集的。

附: 获得上述434种语言的方法
#!/usr/bin/python
from pygments.lexers import get_all_lexers
lexers = get_all_lexers()
for lexer in lexers:
    print lexer