So, I’m preparing a presentation to give at work for one of our “brown bag” / “learning lunch” sessions and I want to put in some code into my slides…
When I used to use TextMate, I used the very cool copy as RTF bundle, for such tasks.
But now I’m a Vim head, here’s how to do the same in Vim…
Now all you have to do is run the command
:RTFHighlight <language> and the
contents of your current buffer (or text selection) will be added to your
clipboard as glorious syntax highlighted rich text, ready to paste into
keynote etc! :)
* You may need to apply the changes from this pull request to the Vim plugin to get it to work with more recent versions of the highlight library.