[Gambas-user] About syntax highlighting and copy/paste to OpenOffice

Demosthenes Koptsis demosthenesk at ...626...
Thu Mar 31 17:15:29 CEST 2011


These days i tried some ways to make the Gambas3 code in an OO3 document
be highlighted as in Gambas3 editor.

1) For this, i used many online web syntax highlighters such as
http://pygments.org/
http://pastebin.com/
http://qbnz.com/highlighter/

but when i copy the code from webpage OO does not make it "Paste
Special" in document, i dont know why...! 

2) also i found an addon for OO named COOoder
the old page is 
http://extensions.services.openoffice.org/node/940

but has no gambas support and the developer has no plans for any update
recently.

Although the COOoder addon is easily configurable.
Someone can take the GeSHi gambas.php file and feed it at cli to script 
http://cgit.freedesktop.org/libreoffice/build/tree/extensions/coooder/php/from-geshi.php

this will make a gambas.xml file which is the highlight for COOoder
addon.

(i edited the GeSHi gambas.php to gambas3.php for anyone who want it,
although it is not complete yet)

The gambas.xml then must be copied to path
/home/user/.openoffice.org/3/user/uno_packages/cache/uno_packages/o36C8H_/coooder-1.1.2.oxt/config/org/openoffice/langs

or similar... where OO addons exist.

But unfortunately the COOoder may be has a bug.
When reach a line with gambas3 comment stops the process of
highlighting. (see screenshot)

i sent an email to COOoder writer and i hope to help me or to fix the
bug.

-----------

Do you know any other way to make highlight the code in OO for gambas
code?

Is it possible when i copy the code from gambas editor to keep meta-data
for OO, so i can make a "Paste Special" ?  

of course the simple paste must keep use raw text.  



-- 
Regards,
Demosthenes Koptsis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gambas3.php
Type: application/x-php
Size: 11492 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20110331/d40adb5c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image_077.png
Type: image/png
Size: 70636 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20110331/d40adb5c/attachment.png>


More information about the User mailing list