sponsor Vim development Vim logo Vim Book Ad

copy-as-rtf : Copy syntax-highlighted code from vim to the OS X clipboard as RTF text

 script karma  Rating 7/7, Downloaded by 1347  Comments, bugs, improvements  Vim wiki

created by
Nathan Witmer
 
script type
utility
 
description
This plugin provides a CopyRTF command for OS X systems that copies the current buffer or selected text to the clipboard as syntax-highlighted RTF text.

This plugin was inspired by the rtf-highlight plugin (https://github.com/dharanasoft/rtf-highlight), but only uses commands available by default on OS X and an HTML conversion plugin that ships with vim.

Mac-only, but if there are equivalent commands for other platforms (html to rtf conversion and copy to clipboard), let me know via the github project (https://github.com/zerowidth/vim-copy-as-rtf) and file an issue or submit a patch.
 
install details
unpack the tarball.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-copy-as-rtf-0.0.3.tgz 0.0.3 2013-04-18 7.0 Nathan Witmer Fixed bug in scratch buffer HTML conversion
vim-copy-as-rtf-0.0.2.tgz 0.0.2 2012-07-14 7.0 Nathan Witmer Adds configurable options for removing or preserving leading whitespace when copying.
vim-copy-as-rtf-0.0.1.tgz 0.0.1 2011-07-31 7.2 Nathan Witmer Initial upload
ip used for rating: 18.191.46.36

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github