This is a migrated thread and some comments may be shown as answers.

code reformatting - remove space between methods in c#

5 Answers 547 Views
Code Templates
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Larry Brindise
Top achievements
Rank 1
Larry Brindise asked on 15 Dec 2010, 03:42 PM
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

5 Answers, 1 is accepted

Sort by
0
Ivo Bratoev
Telerik team
answered on 16 Dec 2010, 02:06 PM
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
0
Larry Brindise
Top achievements
Rank 1
answered on 16 Dec 2010, 02:25 PM
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
0
Ivo Bratoev
Telerik team
answered on 16 Dec 2010, 05:00 PM
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
0
Steve Smith
Top achievements
Rank 1
answered on 02 Dec 2012, 04:55 PM
Ivo - has this feature been added since the original request?
0
Zdravko
Telerik team
answered on 03 Dec 2012, 01:23 PM
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.
Tags
Code Templates
Asked by
Larry Brindise
Top achievements
Rank 1
Answers by
Ivo Bratoev
Telerik team
Larry Brindise
Top achievements
Rank 1
Steve Smith
Top achievements
Rank 1
Zdravko
Telerik team
Share this question
or