Skip to content
Syntax Highlighting to RTF for vim
Find file
Latest commit 8b33550 @rafaelfranca Update master
Failed to load latest commit information.

Vim RTF Pygmentize

Suppose you will write a presentation using Keynote and need to convert chunks of code to Keynote without losing syntax highlighting. This plugin helps you with that: it converts pieces of code to RTF and copies it to the OSX clipboard.

It is basically a wrapper around the pygments library, and was created to help me adding chunks of code to my Keynote presentations.


Right now this plugin only works on OS X, but I would be grateful if someone make it work in another systems.

Before installing the plugin, you need to install the pygments library. You can do it with the following command:

easy_install pygments


There are two available options to configure this plugin:

" Valid options are: 'default', 'emacs', 'friendly' and 'colorful'
let g:rtfp_theme = 'emacs'

You can use the vim2pygments project to generate more themes to pygments using your vim themes.


let g:rtfp_font = 'Monaco'


To highlight a file, you can use:


You can also specify the language to use on highlight with:

:RTFPygmentize <lang>

It also works with visual selections.


This Vim plugin is inspired at rtf-highlight plugin


Rafael Mendonça França (


MIT License. Copyright 2011 Rafael França

Something went wrong with that request. Please try again.