使用 Octopress 后,一直搞不清 Jekyll 下 Pygments 支持的高亮语言及其缩写名,写了一个脚本获取,方便查询。

require 'pygments'
print '|Format', ' '*24, '|Short names for highlight tag', ' '*36, "|\n"
print '|', '-'*30, '|', '-'*65, "|\n"
Pygments.lexers.sort.each do |k,v|
  names = v[:aliases].join(',')
  print '|', k, ' '*(30-k.size), '|', names, ' '*(65-names.size), "|\n"
end

结果如下,可以用 “CTRL+F” 查找。

FormatShort names for highlight tag
ABAPabap
ANTLRantlr
ANTLR With ActionScript Targetantlr-as,antlr-actionscript
ANTLR With C# Targetantlr-csharp,antlr-c#
ANTLR With CPP Targetantlr-cpp
ANTLR With Java Targetantlr-java
ANTLR With ObjectiveC Targetantlr-objc
ANTLR With Perl Targetantlr-perl
ANTLR With Python Targetantlr-python
ANTLR With Ruby Targetantlr-ruby,antlr-rb
APLapl
ActionScriptas,actionscript
ActionScript 3as3,actionscript3
Adaada,ada95ada2005
Agdaagda
Alloyalloy
AmbientTalkat,ambienttalk,ambienttalk/2
ApacheConfapacheconf,aconf,apache
AppleScriptapplescript
AspectJaspectj
Asymptoteasy,asymptote
Augeasaugeas
AutoItautoit
Awkawk,gawk,mawk,nawk
BBCodebbcode
BUGSbugs,winbugs,openbugs
Base Makefilebasemake
Bashbash,sh,ksh
Bash Sessionconsole
Batchfilebat,batch,dosbatch,winbatch
Befungebefunge
BlitzBasicblitzbasic,b3d,bplus
BlitzMaxblitzmax,bmax
Booboo
Brainfuckbrainfuck,bf
Brobro
Cc
C#csharp,c#
C++cpp,c++
CBM BASIC V2cbmbas
CFEngine3cfengine3,cf3
CMakecmake
COBOLcobol
COBOLFreecobolfree
CSScss
CSS+Django/Jinjacss+django,css+jinja
CSS+Genshi Textcss+genshitext,css+genshi
CSS+Lassocss+lasso
CSS+Makocss+mako
CSS+Myghtycss+myghty
CSS+PHPcss+php
CSS+Rubycss+erb,css+ruby
CSS+Smartycss+smarty
CUDAcuda,cu
Ceylonceylon
ChaiScriptchai,chaiscript
Chapelchapel,chpl
Cheetahcheetah,spitfire
Cirrucirru
Clayclay
Clojureclojure,clj
ClojureScriptclojurescript,cljs
CoffeeScriptcoffee-script,coffeescript,coffee
Coldfusion CFCcfc
Coldfusion HTMLcfm
Common Lispcommon-lisp,cl,lisp,elisp,emacs,emacs-lisp
Coqcoq
Croccroc
Cryptolcryptol,cry
Cyphercypher
Cythoncython,pyx,pyrex
Dd
DTDdtd
Darcs Patchdpatch
Dartdart
Debian Control filecontrol,debcontrol
Debian Sourcelistsourceslist,sources.list,debsources
Delphidelphi,pas,pascal,objectpascal
Diffdiff,udiff
Django/Jinjadjango,jinja
Dockerdocker,dockerfile
Duelduel,jbst,jsonml+bst
Dylandylan
Dylan sessiondylan-console,dylan-repl
DylanLIDdylan-lid,lid
EBNFebnf
ECLecl
ERBerb
Eiffeleiffel
Elixirelixir,ex,exs
Elixir iex sessioniex
Embedded Ragelragel-em
Erlangerlang
Erlang erl sessionerl
Evoqueevoque
FSharpfsharp
Factorfactor
Fancyfancy,fy
Fantomfan
Felixfelix,flx
Fortranfortran
FoxProfoxpro,vfp,clipper,xbase
GAPgap
GASgas,asm
GLSLglsl
Genshigenshi,kid,xml+genshi,xml+kid
Genshi Textgenshitext
Gettext Catalogpot,po
Gherkincucumber,gherkin
Gnuplotgnuplot
Gogo
Gologolo
GoodData-CLgooddata-cl
Gosugosu
Gosu Templategst
Groffgroff,nroff,man
Groovygroovy
HTMLhtml
HTML+Cheetahhtml+cheetah,html+spitfire,htmlcheetah
HTML+Django/Jinjahtml+django,html+jinja,htmldjango
HTML+Evoquehtml+evoque
HTML+Genshihtml+genshi,html+kid
HTML+Handlebarshtml+handlebars
HTML+Lassohtml+lasso
HTML+Makohtml+mako
HTML+Myghtyhtml+myghty
HTML+PHPhtml+php
HTML+Smartyhtml+smarty
HTML+Velocityhtml+velocity
HTTPhttp
Hamlhaml
Handlebarshandlebars
Haskellhaskell,hs
Haxehx,haxe,hxsl
Hxmlhaxeml,hxml
Hyhylang
Hybrishybris,hy
IDLidl
INIini,cfg,dosini
IRC logsirc
Idrisidris,idr
Igorigor,igorpro
Inform 6inform6,i6
Inform 6 templatei6t
Inform 7inform7,i7
Ioio
Iokeioke,ik
JAGSjags
JSONjson
Jadejade
Jasminjasmin,jasminxt
Javajava
Java Server Pagejsp
JavaScriptjs,javascript
JavaScript+Cheetahjs+cheetah,javascript+cheetah,js+spitfire,javascript+spitfire
JavaScript+Django/Jinjajs+django,javascript+django,js+jinja,javascript+jinja
JavaScript+Genshi Textjs+genshitext,js+genshi,javascript+genshitext,javascript+genshi
JavaScript+Lassojs+lasso,javascript+lasso
JavaScript+Makojs+mako,javascript+mako
JavaScript+Myghtyjs+myghty,javascript+myghty
JavaScript+PHPjs+php,javascript+php
JavaScript+Rubyjs+erb,javascript+erb,js+ruby,javascript+ruby
JavaScript+Smartyjs+smarty,javascript+smarty
Juliajulia,jl
Julia consolejlcon
Kalkal
Kconfigkconfig,menuconfig,linux-config,kernel-config
Kokakoka
Kotlinkotlin
LLVMllvm
LSLlsl
Lassolasso,lassoscript
Lighttpd configuration filelighty,lighttpd
Limbolimbo
Literate Agdalagda,literate-agda
Literate Cryptollcry,literate-cryptol,lcryptol
Literate Haskelllhs,literate-haskell,lhaskell
Literate Idrislidr,literate-idris,lidris
LiveScriptlive-script,livescript
Logoslogos
Logtalklogtalk
Lualua
MAQLmaql
MOOCodemoocode,moo
MQLmql,mq4,mq5,mql4,mql5
MXMLmxml
Makefilemake,makefile,mf,bsdmake
Makomako
Maskmask
Masonmason
Mathematicamathematica,mma,nb
Matlabmatlab
Matlab sessionmatlabsession
MiniDminid
Modelicamodelica
Modula-2modula2,m2
MoinMoin/Trac Wiki markuptrac-wiki,moin
Monkeymonkey
MoonScriptmoon,moonscript
Mscgenmscgen,msc
MuPADmupad
MySQLmysql
Myghtymyghty
NASMnasm
NSISnsis,nsi,nsh
Nemerlenemerle
NewLispnewlisp
Newspeaknewspeak
Nginx configuration filenginx
Nimrodnimrod,nim
Nixnixos,nix
NumPynumpy
OCamlocaml
Objective-Cobjective-c,objectivec,obj-c,objc
Objective-C++objective-c++,objectivec++,obj-c++,objc++
Objective-Jobjective-j,objectivej,obj-j,objj
Octaveoctave
Oocooc
Opaopa
OpenEdge ABLopenedge,abl,progress
PHPphp,php3,php4,php5
PL/pgSQLplpgsql
POVRaypov
Panpan
Pawnpawn
Perlperl,pl
Perl6perl6,pl6
Pigpig
Pikepike
PostScriptpostscript,postscr
PostgreSQL SQL dialectpostgresql,postgres
PostgreSQL console (psql)psql,postgresql-console,postgres-console
PowerShellpowershell,posh,ps1,psm1
Prologprolog
Propertiesproperties,jproperties
Protocol Bufferprotobuf,proto
Puppetpuppet
PyPy Logpypylog,pypy
Pythonpython,py,sage
Python 3python3,py3
Python 3.0 Tracebackpy3tb
Python Tracebackpytb
Python console sessionpycon
QBasicqbasic,basic
QMLqml
RConsolerconsole,rout
REBOLrebol
RHTMLrhtml,html+erb,html+ruby
RPMSpecspec
RQLrql
RSLrsl
Racketracket,rkt
Ragelragel
Ragel in C Hostragel-c
Ragel in CPP Hostragel-cpp
Ragel in D Hostragel-d
Ragel in Java Hostragel-java
Ragel in Objective C Hostragel-objc
Ragel in Ruby Hostragel-ruby,ragel-rb
Raw token dataraw
Rdrd
Redred,red/system
Redcoderedcode
Rexxrexx,arexx
RobotFrameworkrobotframework
Rubyrb,ruby,duby
Ruby irb sessionrbcon,irb
Rustrust
Ssplus,s,r
SCSSscss
SPARQLsparql
SQLsql
SWIGswig
Sasssass
Scalascala
Scalate Server Pagessp
Scamlscaml
Schemescheme,scm
Scilabscilab
Shell Sessionshell-session
Slashslash
Slimslim
Smalismali
Smalltalksmalltalk,squeak,st
Smartysmarty
Snobolsnobol
SourcePawnsp
SquidConfsquidconf,squid.conf,squid
Stanstan
Standard MLsml
Swiftswift
TOMLtoml
Tcltcl
Tcshtcsh,csh
TeXtex,latex
Teatea
Text onlytext
Todotxttodotxt
Treetoptreetop
TypeScriptts
UrbiScripturbiscript
VB.netvb.net,vbnet
VCTreeStatusvctreestatus
VGLvgl
Valavala,vapi
Velocityvelocity
VimLvim
XMLxml
XML+Cheetahxml+cheetah,xml+spitfire
XML+Django/Jinjaxml+django,xml+jinja
XML+Evoquexml+evoque
XML+Lassoxml+lasso
XML+Makoxml+mako
XML+Myghtyxml+myghty
XML+PHPxml+php
XML+Rubyxml+erb,xml+ruby
XML+Smartyxml+smarty
XML+Velocityxml+velocity
XQueryxquery,xqy,xq,xql,xqm
XSLTxslt
Xtendxtend
YAMLyaml
YAML+Jinjayaml+jinja,salt,sls
Zephirzephir
aspx-csaspx-cs
aspx-vbaspx-vb
autohotkeyahk,autohotkey
c-objdumpc-objdump
ca65ca65
cfstatementcfs
cpp-objdumpcpp-objdump,c++-objdumb,cxx-objdump
d-objdumpd-objdump
dasm16DASM16
dgdg
eCec
liquidliquid
nesCnesc
objdumpobjdump
objdump-nasmobjdump-nasm
reStructuredTextrst,rest,restructuredtext
regregistry
sqlite3consqlite3
systemverilogsystemverilog,sv
verilogverilog,v
vhdlvhdl