I am using Linux. I want to write small pieces of code and paste them into LibreOffice Writer. I do not care too much about which code editor to use, although preferably it would be ViM or Sublime Text 3.
I have tried several avenues, but all of them are unsuccessful:
- Write the code in ViM and save them as HTML with
TOhtml. Then, open the HTML file with Firefox, copy the code and paste it in LibreOffice with Paste Special/HTML. The colors are gone, though. - Write the code in Sublime Text 3 and export it using the SublimeHighlight module. I can copy the text as RTF/HTML, but when pasting it in LibreOffice it pastes the literal HTML code. Paste Special didn't solve it either.
How can one paste HTML/RTF code into LibreOffice Writer?
Running Xubuntu 16.04 and LibreOffice 5.1.6.2 10m0(Build:2)