Hi David,

I probably have messed something up in the editor coding style. Currently
I'm using at least three different editors ad the same time.
I know it's weird and bad, but don't have time to switch to a proper env.
In Christmas days things are even more difficult...



On Tue, Dec 17, 2019 at 2:17 AM David Wright <lily...@lionunicorn.co.uk>
wrote:

> On Mon 16 Dec 2019 at 23:55:52 (+0100), Paolo Prete wrote:
> > P.S) I don't know why the browser's viewer messes up the indentation of
> > these attachments.
> > If so, I ask if are there volunteers to fix that and re-post the snippet
> (I
> > see correct indentation if I paste the code to any online js editor)
>
> I don't know how scheme is meant to be indented so, other than to say
> that my emacs (LilyPond mode) indents by aligning parentheses of the
> same nesting-level (which indents the 8th and 9th lines to >60 chars),
> I'll move on to C.
>
> It appears you're indenting with real TAB characters, possibly
> generated by your pressing the TAB key. My tabs are set at the
> standard size (8) which makes some of the code cross the screen.
> Perhaps you are expecting something else?
>
> Looking, for example, at the lines that you've split, editing your
> TABS to two spaces brings the continuation line into sensible
> alignment with the initial line. So, if you want your indentation to
> be displayed correctly by other people (including your own browser?) I
> would replace your real TABs with spaces before attaching the files.
>
> Editing in emacs, the TAB key can be made to indent by two spaces,
> and conversion of 8 (or any other number of) spaces into a TAB
> prevented.
>
> >       distanceFromCenter = Math.abs(event.pageX * scaleX -
> >
>                                                      (leftX + (rightX -
> leftX)/2))
>
> becomes
>
> >   distanceFromCenter = Math.abs(event.pageX * scaleX -
> >                                 (leftX + (rightX - leftX)/2))
>
> and
>
> >       minDistance = Math.min(distanceFromLeftSide,
> >
>                       distanceFromCenter,
> >
>                       distanceFromRightSide)
>
> becomes
>
> >   minDistance = Math.min(distanceFromLeftSide,
> >                          distanceFromCenter,
> >                          distanceFromRightSide)
>
> when TAB is replaced by two spaces.
>
> Cheers,
> David.
>

Reply via email to