Author Topic: C case alias  (Read 1185 times)

rbmisc

  • Community Member
  • Posts: 16
  • Hero Points: 0
C case alias
« on: February 22, 2013, 09:33:05 pm »
I have case alias not aligning correctly even though the alias looks like it should work.
I am wanting case to look like:
case :
{
   break;
}

but I am getting a space at the beginning from where I want it to be and the brackets don't line up with case as above.
 case :
   {
       break;
   }

Here is the alias I have:
case %\c:
{
%\ibreak;
}
 

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: C case alias
« Reply #1 on: February 25, 2013, 06:58:31 pm »
What version are you working in? Sounds like you're bumping up against the C/C++ beautifier trying to beautify your alias expansion. To get to the C++ beautifier settings, in the Tools > Options page, under the C/C++ language setting, go to the Formatting section. From there you can pick the beautifier profile and click "Edit". Search for 'case' in the beautifier settings, and under "Indent Rule Exceptions" you'll see the "Indent" and "Brace aligned with case" settings for the case keyword. I've attached a screenshot of that dialog section. As you make modifications to the settings the code example in the left side of the dialog will update, so you can experiment.

rbmisc

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: C case alias
« Reply #2 on: February 25, 2013, 07:04:16 pm »
Thank you.  That fixed my problem.