Code indentation [v0.4.8]

Two minor releases before Mono-D v0.5 – the tension rises ;)

This time I’ve taken several parts of MD’s code which care about (more or less) intelligent code indentation – so the automated placement of tabs & spaces e.g. after a line-break has been made – and have put them into Mono-D, whereas several things had to be modified and altered so they fit to D code and the D environment.
As a result, quite all buggy places of wrong tab placement seem to have disappeared like the handling of public: and all its following lines of code.

I really hope that I finally can begin to work on the formatter in the next weeks or so..

5 Comments

  • Martin
    January 16, 2013 - 5:10 pm | Permalink

    Sorry about my earlier comment, didn’t realize that the indentation would be removed. I’ve provided a pastebin link instead to show what I mean

    http://pastebin.com/Ct2virbw

    • alex
      January 16, 2013 - 5:11 pm | Permalink

      I’ve read it in the notification mail already :)

    • alex
      January 16, 2013 - 8:10 pm | Permalink

      Should work now. Just update it. If you notice further bugs, please just tell me here or (especially for longer reports) file a bug report in the issue tracker on github.

  • Martin
    January 16, 2013 - 5:05 pm | Permalink

    Not to be an ass or anything, but the indentation just doesn’t work here. I tried both smart/auto indentation, neither works.

    I’m running MonoDevelop 3.0.6 and I’ve tried re-installing the Mono-D add-in several times with no sucess.

    This is what I want:

    class Test
    {
    public:
    int value;
    int otherValue;
    }

    This is what I get with the smart indentation:

    class Test
    {
    public:
    int value;
    int otherValue;
    }

    :(

    • alex
      January 16, 2013 - 5:10 pm | Permalink

      I should have done more tests before releasing it. Well okay, I’ll try to fix it.

  • Leave a Reply

    Your email address will not be published. Required fields are marked *


    eight − 5 =

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>