discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

alignment of source text

BR
Bob Roos
Sun, Nov 7, 2021 6:19 AM

Hello OpenSCAD,

is there a program that will "pretty" up a source listing by giving it a uniform appearance?

So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping.

Thanks,

Bob Ros

--
Best regards,
Bob                          mailto:roosbob@wybatap.com

Hello OpenSCAD, is there a program that will "pretty" up a source listing by giving it a uniform appearance? So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping. Thanks, Bob Ros -- Best regards, Bob mailto:roosbob@wybatap.com
C
corpsman
Sun, Nov 7, 2021 7:59 AM

i wrote a program like that and promoted it to the list asking if there
is the ability to include such a external code formater into OpenScad.
Did not get any responce till now.

On 11/7/21 7:19 AM, Bob Roos wrote:

Hello OpenSCAD,

is there a program that will "pretty" up a source listing by giving it a uniform appearance?

So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping.

Thanks,

Bob Ros

--

Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei.

--

Schütze deine Privatsphäre, nutze E-mail Verschlüsselung.
Wie das geht steht z.B. hier :
https://support.mozilla.org/en-US/kb/digitally-signing-and-encrypting-messages#w_installing-gpg-and-enigmail

i wrote a program like that and promoted it to the list asking if there is the ability to include such a external code formater into OpenScad. Did not get any responce till now. On 11/7/21 7:19 AM, Bob Roos wrote: > Hello OpenSCAD, > > is there a program that will "pretty" up a source listing by giving it a uniform appearance? > > So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping. > > Thanks, > > Bob Ros > > > -- Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei. -- Schütze deine Privatsphäre, nutze E-mail Verschlüsselung. Wie das geht steht z.B. hier : https://support.mozilla.org/en-US/kb/digitally-signing-and-encrypting-messages#w_installing-gpg-and-enigmail
BR
Bob Roos
Sun, Nov 7, 2021 12:23 PM

Hi corpsman,

Even if it were not incorporated into the program itself it would be useful to "spiff" up the code before it is opened in OpenSCAD itself.

I would be interested in having a copy if you would share it.

roos bob at wybatap dot com  (remove spaces and adjust key words)

Bob Roos

Sunday, November 7, 2021, 2:59:33 AM, you wrote:

i wrote a program like that and promoted it to the list asking if there
is the ability to include such a external code formater into OpenScad.
Did not get any responce till now.

On 11/7/21 7:19 AM, Bob Roos wrote:

Hello OpenSCAD,

is there a program that will "pretty" up a source listing by giving it a uniform appearance?

So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping.

Thanks,

Bob Ros

--
have Fun,
Bob                          mailto:roosbob@wybatap.com

Hi corpsman, Even if it were not incorporated into the program itself it would be useful to "spiff" up the code before it is opened in OpenSCAD itself. I would be interested in having a copy if you would share it. roos bob at wybatap dot com (remove spaces and adjust key words) Bob Roos Sunday, November 7, 2021, 2:59:33 AM, you wrote: > i wrote a program like that and promoted it to the list asking if there > is the ability to include such a external code formater into OpenScad. > Did not get any responce till now. > On 11/7/21 7:19 AM, Bob Roos wrote: >> Hello OpenSCAD, >> >> is there a program that will "pretty" up a source listing by giving it a uniform appearance? >> >> So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping. >> >> Thanks, >> >> Bob Ros >> >> >> -- have Fun, Bob mailto:roosbob@wybatap.com
T
Terry
Mon, Nov 8, 2021 9:36 AM

I too would appreciate such a tool.

I'm not a programmer but for my electronics hobby last year I got into Arduino.
(Because of its similarities that has made my more recent learning of OpenSCAD a
bit easier.) One tool built into Arduino is Auto Format; the hotkey <Ctrl+t>
applies the sort of changes Bob mentioned.

Terry

====================

On Sun, 7 Nov 2021 08:59:33 +0100, you wrote:

i wrote a program like that and promoted it to the list asking if there
is the ability to include such a external code formater into OpenScad.
Did not get any responce till now.

On 11/7/21 7:19 AM, Bob Roos wrote:

Hello OpenSCAD,

is there a program that will "pretty" up a source listing by giving it a uniform appearance?

So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping.

Thanks,

Bob Ros

--

Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei.

I too would appreciate such a tool. I'm not a programmer but for my electronics hobby last year I got into Arduino. (Because of its similarities that has made my more recent learning of OpenSCAD a bit easier.) One tool built into Arduino is Auto Format; the hotkey <Ctrl+t> applies the sort of changes Bob mentioned. Terry ==================== On Sun, 7 Nov 2021 08:59:33 +0100, you wrote: >i wrote a program like that and promoted it to the list asking if there >is the ability to include such a external code formater into OpenScad. >Did not get any responce till now. > >On 11/7/21 7:19 AM, Bob Roos wrote: >> Hello OpenSCAD, >> >> is there a program that will "pretty" up a source listing by giving it a uniform appearance? >> >> So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping. >> >> Thanks, >> >> Bob Ros >> >> >> >-- > >Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei.
BC
Bob Carlson
Mon, Nov 8, 2021 5:03 PM

At 50+ years of programming, formatting my code is a compulsion and I do it automatically.

For those of you who aren’t programmers, formatting code for READING is really important. You will read the code many more times than you will write it. Also, though you know what’s going on now, if you return to this code in 4 months you won’t remember everything so put in comments as if someone else was having to read and understand the code. You will be happy you did. “Now why did I add 4/3 of H there?”.

-Bob
Tucson AZ

On Nov 8, 2021, at 02:36, Terry terrypingm@gmail.com wrote:

I too would appreciate such a tool.

I'm not a programmer but for my electronics hobby last year I got into Arduino.
(Because of its similarities that has made my more recent learning of OpenSCAD a
bit easier.) One tool built into Arduino is Auto Format; the hotkey <Ctrl+t>
applies the sort of changes Bob mentioned.

Terry

====================

On Sun, 7 Nov 2021 08:59:33 +0100, you wrote:

i wrote a program like that and promoted it to the list asking if there
is the ability to include such a external code formater into OpenScad.
Did not get any responce till now.

On 11/7/21 7:19 AM, Bob Roos wrote:

Hello OpenSCAD,

is there a program that will "pretty" up a source listing by giving it a uniform appearance?

So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping.

Thanks,

Bob Ros

--

Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

At 50+ years of programming, formatting my code is a compulsion and I do it automatically. For those of you who aren’t programmers, formatting code for READING is really important. You will read the code many more times than you will write it. Also, though you know what’s going on now, if you return to this code in 4 months you won’t remember everything so put in comments as if someone else was having to read and understand the code. You will be happy you did. “Now why did I add 4/3 of H there?”. -Bob Tucson AZ On Nov 8, 2021, at 02:36, Terry <terrypingm@gmail.com> wrote: I too would appreciate such a tool. I'm not a programmer but for my electronics hobby last year I got into Arduino. (Because of its similarities that has made my more recent learning of OpenSCAD a bit easier.) One tool built into Arduino is Auto Format; the hotkey <Ctrl+t> applies the sort of changes Bob mentioned. Terry ==================== On Sun, 7 Nov 2021 08:59:33 +0100, you wrote: > i wrote a program like that and promoted it to the list asking if there > is the ability to include such a external code formater into OpenScad. > Did not get any responce till now. > > On 11/7/21 7:19 AM, Bob Roos wrote: >> Hello OpenSCAD, >> >> is there a program that will "pretty" up a source listing by giving it a uniform appearance? >> >> So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping. >> >> Thanks, >> >> Bob Ros >> >> >> > -- > > Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org
D
Dave
Mon, Nov 8, 2021 7:36 PM

There is a tool that I have used for years to tidy code, mainly C, C++ and C#, and it works well.

You can define your own strategy for a language and I don't think OpenScad would pose any significant problems.

It's called "Uncrustify" and you can find it HERE.

Regards,
Dave

On 08/11/2021 17:03, Bob Carlson wrote:

<pre class="moz-quote-pre" wrap="">At 50+ years of programming, formatting my code is a compulsion and I do it automatically.

For those of you who aren’t programmers, formatting code for READING is really important. You will read the code many more times than you will write it. Also, though you know what’s going on now, if you return to this code in 4 months you won’t remember everything so put in comments as if someone else was having to read and understand the code. You will be happy you did. “Now why did I add 4/3 of H there?”.

-Bob
Tucson AZ



On Nov 8, 2021, at 02:36, Terry <a class="moz-txt-link-rfc2396E" href="mailto:terrypingm@gmail.com"><terrypingm@gmail.com></a> wrote:

I too would appreciate such a tool.

I'm not a programmer but for my electronics hobby last year I got into Arduino.
(Because of its similarities that has made my more recent learning of OpenSCAD a
bit easier.) One tool built into Arduino is Auto Format; the hotkey <Ctrl+t>
applies the sort of changes Bob mentioned.

Terry

====================

On Sun, 7 Nov 2021 08:59:33 +0100, you wrote:

<pre class="moz-quote-pre" wrap="">i wrote a program like that and promoted it to the list asking if there
is the ability to include such a external code formater into OpenScad.
Did not get any responce till now.

On 11/7/21 7:19 AM, Bob Roos wrote:
<pre class="moz-quote-pre" wrap="">Hello OpenSCAD,

 is there a program that will "pretty" up a source listing by giving it a uniform appearance?

So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping.

Thanks,

Bob Ros



<pre class="moz-quote-pre" wrap="">-- 

Auf meiner Homepage <a class="moz-txt-link-abbreviated" href="http://www.Corpsman.de">www.Corpsman.de</a> ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei.
<pre class="moz-quote-pre" wrap="">_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to <a class="moz-txt-link-abbreviated" href="mailto:discuss-leave@lists.openscad.org">discuss-leave@lists.openscad.org</a>
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to <a class="moz-txt-link-abbreviated" href="mailto:discuss-leave@lists.openscad.org">discuss-leave@lists.openscad.org</a>
D
Dave
Mon, Nov 8, 2021 7:56 PM

There is also a tool to help generate CFG for "uncrustify" and allows you to interactively see the effect you config has.

It's called "UniversalIndentGUI_win32" and you can find it HERE.

Regards,
Dave

On 08/11/2021 19:36, Dave wrote:

There is a tool that I have used for years to tidy code, mainly C, C++ and C#, and it works well.

You can define your own strategy for a language and I don't think OpenScad would pose any significant problems.

It's called "Uncrustify" and you can find it HERE.

Regards,
Dave

On 08/11/2021 17:03, Bob Carlson wrote:

<pre class="moz-quote-pre" wrap="">At 50+ years of programming, formatting my code is a compulsion and I do it automatically.

For those of you who aren’t programmers, formatting code for READING is really important. You will read the code many more times than you will write it. Also, though you know what’s going on now, if you return to this code in 4 months you won’t remember everything so put in comments as if someone else was having to read and understand the code. You will be happy you did. “Now why did I add 4/3 of H there?”.

-Bob
Tucson AZ



On Nov 8, 2021, at 02:36, Terry <a class="moz-txt-link-rfc2396E" href="mailto:terrypingm@gmail.com" moz-do-not-send="true"><terrypingm@gmail.com></a> wrote:

I too would appreciate such a tool.

I'm not a programmer but for my electronics hobby last year I got into Arduino.
(Because of its similarities that has made my more recent learning of OpenSCAD a
bit easier.) One tool built into Arduino is Auto Format; the hotkey <Ctrl+t>
applies the sort of changes Bob mentioned.

Terry

====================

On Sun, 7 Nov 2021 08:59:33 +0100, you wrote:

<pre class="moz-quote-pre" wrap="">i wrote a program like that and promoted it to the list asking if there
is the ability to include such a external code formater into OpenScad.
Did not get any responce till now.

On 11/7/21 7:19 AM, Bob Roos wrote:
<pre class="moz-quote-pre" wrap="">Hello OpenSCAD,

 is there a program that will "pretty" up a source listing by giving it a uniform appearance?

So all the indents are even for each level of indentation and the braces are paired off for easy visualation of grouping.

Thanks,

Bob Ros



<pre class="moz-quote-pre" wrap="">-- 

Auf meiner Homepage <a class="moz-txt-link-abbreviated" href="http://www.Corpsman.de" moz-do-not-send="true">www.Corpsman.de</a> ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei.
<pre class="moz-quote-pre" wrap="">_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to <a class="moz-txt-link-abbreviated" href="mailto:discuss-leave@lists.openscad.org" moz-do-not-send="true">discuss-leave@lists.openscad.org</a>
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to <a class="moz-txt-link-abbreviated" href="mailto:discuss-leave@lists.openscad.org" moz-do-not-send="true">discuss-leave@lists.openscad.org</a>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to <a class="moz-txt-link-abbreviated" href="mailto:discuss-leave@lists.openscad.org">discuss-leave@lists.openscad.org</a>
RC
Ray Cadmus
Mon, Nov 8, 2021 9:03 PM

Amen!  I'm often the victim of my own lack of comments.   (Despite my
own 60 years of coding)

--

On 11/8/21 11:03 AM, Bob Carlson wrote:

At 50+ years of programming, formatting my code is a compulsion and I do it automatically.

For those of you who aren’t programmers, formatting code for READING is really important. You will read the code many more times than you will write it. Also, though you know what’s going on now, if you return to this code in 4 months you won’t remember everything so put in comments as if someone else was having to read and understand the code. You will be happy you did. “Now why did I add 4/3 of H there?”.

-Bob
Tucson AZ

Amen!  I'm often the victim of my own lack of comments.   (Despite my own 60 years of coding) -- On 11/8/21 11:03 AM, Bob Carlson wrote: > At 50+ years of programming, formatting my code is a compulsion and I do it automatically. > > For those of you who aren’t programmers, formatting code for READING is really important. You will read the code many more times than you will write it. Also, though you know what’s going on now, if you return to this code in 4 months you won’t remember everything so put in comments as if someone else was having to read and understand the code. You will be happy you did. “Now why did I add 4/3 of H there?”. > > -Bob > Tucson AZ > >
LM
Leonard Martin Struttmann
Mon, Nov 8, 2021 10:50 PM

Comments are a love letter to your future self.

On Mon, Nov 8, 2021 at 3:04 PM Ray Cadmus rcadmus@gmail.com wrote:

Amen!  I'm often the victim of my own lack of comments.  (Despite my
own 60 years of coding)

--

On 11/8/21 11:03 AM, Bob Carlson wrote:

At 50+ years of programming, formatting my code is a compulsion and I do

it automatically.

For those of you who aren’t programmers, formatting code for READING is

really important. You will read the code many more times than you will
write it. Also, though you know what’s going on now, if you return to this
code in 4 months you won’t remember everything so put in comments as if
someone else was having to read and understand the code. You will be happy
you did. “Now why did I add 4/3 of H there?”.

-Bob
Tucson AZ


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Comments are a love letter to your future self. On Mon, Nov 8, 2021 at 3:04 PM Ray Cadmus <rcadmus@gmail.com> wrote: > Amen! I'm often the victim of my own lack of comments. (Despite my > own 60 years of coding) > > -- > > On 11/8/21 11:03 AM, Bob Carlson wrote: > > At 50+ years of programming, formatting my code is a compulsion and I do > it automatically. > > > > For those of you who aren’t programmers, formatting code for READING is > really important. You will read the code many more times than you will > write it. Also, though you know what’s going on now, if you return to this > code in 4 months you won’t remember everything so put in comments as if > someone else was having to read and understand the code. You will be happy > you did. “Now why did I add 4/3 of H there?”. > > > > -Bob > > Tucson AZ > > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >