Sublime Text 2 Paste with Colors to MS Word

Mariska picture Mariska · Jan 10, 2014 · Viewed 61.8k times · Source

I would like to paste my code to a word document while preserving the highlighted, colored texts. Is there a way to do this?

Answer

Allen Bargi picture Allen Bargi · Jan 10, 2014

You can install highlight plugin and then use SublimeHighlight: copy to clipboard as RTF command from the command palette.

enter image description here

If you want to use your own color scheme use ExportHTML plugin to export to html and copy and paste the html in MS Word. HTMLExport can be configured to use any of your installed color schemes. just read the docs and look at the default settings.

Use a browser like Safari that can copy in RTF to the clipboard. For me chrome does not work.