How do I keep formatting when copying from gedit into open office?

Adam picture Adam · Mar 8, 2010 · Viewed 8.3k times · Source

I am editing octave files in gedit, and it does a nice job highlighting them. However, when I try to copy and paste the code into Open Office, it loses all formatting. Even when I try paste > special, it still doesn't work.

Is there any way to do this without having to manually go through all my code highlighting keywords?

Answer

ignucius picture ignucius · Sep 3, 2011

The free and open source editor KATE can actually export in HTML Octave's code keeping the correct syntax highlighting.