highlight-launch

So I write an unfortunate amount of code for school, and usually end up copy-pasting it into an OpenOffice document to hand in. And I like to have it syntax-highlighted.

Made this fairly easy with the ‘highlight‘ program, and this handy shell function:

function highlight-launch {
        tmpfile=$(mktemp)
        highlight -R $* > $tmpfile
        oowriter $tmpfile
}
Advertisements
This entry was posted in openoffice. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s