https://github.com/zerowidth/vim-copy-as-rtf
Copy syntax-highlighted code from vim to the OS X clipboard as RTF text
https://github.com/zerowidth/vim-copy-as-rtf
Last synced: 8 months ago
JSON representation
Copy syntax-highlighted code from vim to the OS X clipboard as RTF text
- Host: GitHub
- URL: https://github.com/zerowidth/vim-copy-as-rtf
- Owner: zerowidth
- License: mit
- Created: 2011-07-28T01:21:25.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2022-01-28T20:45:05.000Z (over 4 years ago)
- Last Synced: 2025-04-03T11:15:01.099Z (about 1 year ago)
- Language: Vim script
- Homepage: http://www.vim.org/scripts/script.php?script_id=3676
- Size: 11.7 KB
- Stars: 123
- Watchers: 1
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-copy-as-rtf
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](https://github.com/dharanasoft/rtf-highlight) plugin, but only
uses commands available by default on OS X and an HTML conversion plugin that
ships with vim.
## Requirements
* OS X
* The `:TOhtml` plugin, which ships with vim and is enabled by default
## Installation
Use [pathogen](https://github.com/tpope/vim-pathogen/) and clone this repo to
`~/.vim/bundle`.
## Usage
When the plugin is loaded, the following command is available:
:CopyRTF
It operates on either the current buffer or the currently selected text. After
the command executes, the RTF text will be available on the system clipboard.
For customization of how the text is generated, see the vim documentation for
the `:TOhtml` command.