code reformatting - remove space between methods in c#

6 posts, 0 answers
  1. Larry Brindise
    Larry Brindise  avatar
    5 posts
    Member since:
    Jun 2010

    Posted 15 Dec 2010 Link to this post

    I have just started using JustCode and have found its default settings usable enough to justify my NOT learning how to change them.  One of the things I LOVE is the auto-reformatting of code.  Ctl-Alt-F - WOW!!!
    But now I would like to change whatever needs to be changed so that it does not put a blank line between every property and method.  (I find the squiggly-braces are enough spacing for my eyes for code readibility).  For example, the lines between each of these objects is unnecessary and makes less code appear on a screen:

            private int sectionID;
    //why does auto format put a space here?  I don't want it to automatically do this
            public int SectionID
            {
                get
                {
                    return sectionID;
                }
                set
                {
                    getExpirationTimestamp = DateTime.MinValue;
                    ds_Dataset1 = null;
                    ds_Dataset2 = null;
                    sectionID = value;
                }
            }
    //why does auto format put a space here?  I don't want it to automatically do this
            private DateTime getSeatsTimestamp = DateTime.MinValue;

    Can I ask if there are a few simple steps to change such a setting?  I don't know where to begin looking, and my project delivery requirements make it unfeasible for me to take the time to learn another technology just for the sake of changing code spacing (but I'm willing to follow a few simple steps)....I thank you in advance for any help!
    Larry
  2. Ivo Bratoev
    Admin
    Ivo Bratoev avatar
    107 posts

    Posted 16 Dec 2010 Link to this post

    Hi Larry,

    Thanks for your feedback!
    Currently JustCode does not have a setting where you can configure the number of lines between fields/properties/method. We always put 1 line in the case you described.
    Fortunately, one of our main goals for the next release of JustCode is improving greatly the JustCode formatter. I will make sure that we give higher priority to your issue so it will be fixed in our first internal build for the next release.

    Greetings,
    Ivo Bratoev
    the Telerik team
    Browse the videos here>> to help you get started with JustCode
  3. DevCraft banner
  4. Larry Brindise
    Larry Brindise  avatar
    5 posts
    Member since:
    Jun 2010

    Posted 16 Dec 2010 Link to this post

    I look forward to this.
    As long as it appears you will be working in this area, would we also be able to specify the number of spaces for indenting codeblocks as below?

    if (a==b)
    {
        //there are four spaces in front of this line
    }
      
    if (a==b)
    {
      //there are two spaces in front of this line
    }

    Thanks,
    Larry
  5. Ivo Bratoev
    Admin
    Ivo Bratoev avatar
    107 posts

    Posted 16 Dec 2010 Link to this post

    Hello Larry,

    You can try changing "Indent size" setting in Visual Studio itself. Go to Tools -> Options -> Text Editor -> C# -> Tabs ->Indent size.
    I hope this will work in your case.

    Greetings,
    Ivo Bratoev
    the Telerik team
    Browse the videos here>> to help you get started with JustCode
  6. Steve Smith
    Steve Smith avatar
    1 posts
    Member since:
    Jul 2009

    Posted 02 Dec 2012 Link to this post

    Ivo - has this feature been added since the original request?
  7. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 03 Dec 2012 Link to this post

    Hi,

     Thanks for contacting us.
    If you are asking for the first request I would point you to JustCode's menu > Options > Code Style > C# > Blank Lines.
    Unfortunately, we have not implemented a way to specify the size of the indentation through JustCode and the only way is still through VS, because this way both formatters will show the same result.
    Thanks.

    Greetings,
    Zdravko
    the Telerik team
    Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
Back to Top
DevCraft banner