You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openoffice.apache.org by Dotan Cohen <do...@gmail.com> on 2011/11/15 11:34:02 UTC

Code syntax highlighting: is there anything decent?

Attached is a document which demonstrates the use of three tools for
highlighting code in OOo:
The Code Formatter extension
The COOoder extension
http://xzfv.appspot.com/s/format.html

As can be seen, none of these are very good (at least with Java). Can
someone suggest any other tool?

Thanks!

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

Re: Code syntax highlighting: is there anything decent?

Posted by Dotan Cohen <do...@gmail.com>.
On Wed, Nov 16, 2011 at 03:25, NoOp <gl...@sbcglobal.net> wrote:
> Dotan, I don't have an answer for you. But I reckon that answers the
> question as to whether this list accepts attachments. :-)
>

I admit that I was not certain that it would be accepted. I assume by
your response that the attachment did in fact get through. I always
thought that if any list should accept attachments, then the OOo list
should.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Code syntax highlighting: is there anything decent?

Posted by NoOp <gl...@sbcglobal.net>.
On 11/15/2011 02:34 AM, Dotan Cohen wrote:
> Attached is a document which demonstrates the use of three tools for
> highlighting code in OOo:
> The Code Formatter extension
> The COOoder extension
> http://xzfv.appspot.com/s/format.html
> 
> As can be seen, none of these are very good (at least with Java). Can
> someone suggest any other tool?
...
Dotan, I don't have an answer for you. But I reckon that answers the
question as to whether this list accepts attachments. :-)

Gary



---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Code syntax highlighting: is there anything decent?

Posted by Dotan Cohen <do...@gmail.com>.
On Wed, Nov 16, 2011 at 15:54, Dotan Cohen <do...@gmail.com> wrote:
> On Wed, Nov 16, 2011 at 12:03, Harold Fuchs <ha...@wolfeden.demon.co.uk> wrote:
>> Ah. How about formatting the code in a "proper" code handler and then
>> copy/paste-ing the result into your document?
>>
>
> Of course. I tried copying and pasting from Eclipse and MonoDevelop,
> but returned black (nonhighlighted) text. In fact, even the tabs were
> gone!
>
>

I should mention that copying and pasting from Visual Studio to MS
Word allegedly preserves formating and syntax highlighting.


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Code syntax highlighting: is there anything decent?

Posted by Dotan Cohen <do...@gmail.com>.
On Wed, Nov 16, 2011 at 12:03, Harold Fuchs <ha...@wolfeden.demon.co.uk> wrote:
> Ah. How about formatting the code in a "proper" code handler and then
> copy/paste-ing the result into your document?
>

Of course. I tried copying and pasting from Eclipse and MonoDevelop,
but returned black (nonhighlighted) text. In fact, even the tabs were
gone!


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Code syntax highlighting: is there anything decent?

Posted by Dotan Cohen <do...@gmail.com>.
On Wed, Nov 16, 2011 at 12:03, Harold Fuchs <ha...@wolfeden.demon.co.uk> wrote:
> Ah. How about formatting the code in a "proper" code handler and then
> copy/paste-ing the result into your document?
>
> Regards, Harold
>

I must admit that I was wrong.

Copying from Eclipse or MonoDevelop and then pasting into Open Office
Writer 3.4 _does_ preserve formatting and syntax highlighting. I do
not know why this did not work for me earlier, but it works fine now.

Thanks you!

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Code syntax highlighting: is there anything decent?

Posted by Harold Fuchs <ha...@wolfeden.demon.co.uk>.
----- Original Message ----- 
From: "Dotan Cohen" <do...@gmail.com>
Newsgroups: gmane.comp.apache.incubator.ooo.user
To: <oo...@incubator.apache.org>
Sent: Tuesday, November 15, 2011 3:29 PM
Subject: Re: Code syntax highlighting: is there anything decent?


> On Tue, Nov 15, 2011 at 17:14, Harold Fuchs <hw...@gmail.com> 
> wrote:
>> I have to say that when I was writing code I used a text editor rather 
>> than
>> a word processor. So, MS Word and OOo are word processors even though 
>> they
>> can save files as plain text whereas Notepad and Wordpad are text editors
>> even though Wordpad can save files in RTF which is a restricted sort of 
>> word
>> processor document. For code, if you're not using an IDE and assuming 
>> you're
>> on Windows, I'd use either PSPAD (http://www.pspad.com/) or Notepad++
>> (http://notepad-plus-plus.org/). Both are free and very configurable. 
>> Both
>> have Java syntax handling "in the box". Both can be installed on a USB 
>> stick
>> or similar without touching the Windows Registry.
>>
>
> Thank you Harold. I actually code in VIM but recently I have had to
> write about code and Open Office is the natural place to write about
> anything. Therefore I have small (5-20 LOC) code snippets in a
> formatted text document.
>
Dotan,

Ah. How about formatting the code in a "proper" code handler and then 
copy/paste-ing the result into your document?

Regards, Harold 


---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Code syntax highlighting: is there anything decent?

Posted by Dotan Cohen <do...@gmail.com>.
On Tue, Nov 15, 2011 at 17:14, Harold Fuchs <hw...@gmail.com> wrote:
> I have to say that when I was writing code I used a text editor rather than
> a word processor. So, MS Word and OOo are word processors even though they
> can save files as plain text whereas Notepad and Wordpad are text editors
> even though Wordpad can save files in RTF which is a restricted sort of word
> processor document. For code, if you're not using an IDE and assuming you're
> on Windows, I'd use either PSPAD (http://www.pspad.com/) or Notepad++
> (http://notepad-plus-plus.org/). Both are free and very configurable. Both
> have Java syntax handling "in the box". Both can be installed on a USB stick
> or similar without touching the Windows Registry.
>

Thank you Harold. I actually code in VIM but recently I have had to
write about code and Open Office is the natural place to write about
anything. Therefore I have small (5-20 LOC) code snippets in a
formatted text document.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org


Re: Code syntax highlighting: is there anything decent?

Posted by Harold Fuchs <hw...@gmail.com>.
"Dotan Cohen" <do...@gmail.com> wrote in message 
news:CAKDXFkM1kQw-Ykkn5Nu-_aJcaOBqnEvmk5nxu2CBqghJU_btJQ@mail.gmail.com...
> Attached is a document which demonstrates the use of three tools for
> highlighting code in OOo:
> The Code Formatter extension
> The COOoder extension
> http://xzfv.appspot.com/s/format.html
>
> As can be seen, none of these are very good (at least with Java). Can
> someone suggest any other tool?
>
> Thanks!
>
> -- 
> Dotan Cohen

I have to say that when I was writing code I used a text editor rather than 
a word processor. So, MS Word and OOo are word processors even though they 
can save files as plain text whereas Notepad and Wordpad are text editors 
even though Wordpad can save files in RTF which is a restricted sort of word 
processor document. For code, if you're not using an IDE and assuming you're 
on Windows, I'd use either PSPAD (http://www.pspad.com/) or Notepad++ 
(http://notepad-plus-plus.org/). Both are free and very configurable. Both 
have Java syntax handling "in the box". Both can be installed on a USB stick 
or similar without touching the Windows Registry.

-- 
Harold Fuchs
London, England 



---------------------------------------------------------------------
To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org
For additional commands, e-mail: ooo-users-help@incubator.apache.org