Sha256: 5664d1bd4840c921329f88c220be62d8d7658a604663b2811a1baad2528fe76c

Contents?: true

Size: 1.19 KB

Versions: 24

Compression:

Stored size: 1.19 KB

Contents

.. -*- mode: rst -*-

===================================
Using Pygments in various scenarios
===================================

PyGtk
-----

Armin has written a piece of sample code that shows how to create a Gtk
`TextBuffer` object containing Pygments-highlighted text.

See the article here: http://lucumr.pocoo.org/cogitations/2007/05/30/pygments-gtk-rendering/

Wordpress
---------

He also has a snippet that shows how to use Pygments in WordPress:

http://lucumr.pocoo.org/cogitations/2007/05/30/pygments-in-wordpress/

Markdown
--------

Since Pygments 0.9, the distribution ships Markdown_ preprocessor sample code
that uses Pygments to render source code in `external/markdown-processor.py`.
You can copy and adapt it to your liking.

.. _Markdown: http://www.freewisdom.org/projects/python-markdown/

TextMate
--------

Antonio Cangiano has created a Pygments bundle for TextMate that allows to
colorize code via a simple menu option.  It can be found here_.

.. _here: http://antoniocangiano.com/2008/10/28/pygments-textmate-bundle/

Bash completion
---------------

The source distribution contains a file ``external/pygments.bashcomp`` that
sets up completion for the ``pygmentize`` command in bash.

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
gitlab-pygments.rb-0.3.2 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.3.7 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.3.6 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.3.5 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.3.4 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.3.3 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.3.2 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.3.1 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.3.0 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.13 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.12 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.11 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.10 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.9 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.8 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.7 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.6 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.4 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.3 vendor/pygments-main/docs/src/integrate.txt
pygments.rb-0.2.2 vendor/pygments-main/docs/src/integrate.txt