Author Topic: Beautify settings  (Read 2573 times)

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Beautify settings
« on: September 13, 2016, 03:54:02 PM »
I decided to try to turn on the beautify while typing settings since this is a new version. I've had these type of settings disabled in previous versions because of the following problem.

What I want is beautify to pad function parentheses for me as follows:

function( parameter1, param2 );

Note the spaces after the open paren and before the close paren. For functions without parameters I want no spaces:

function2();

When I turn on beautify while typing the editor will remove those spaces in all cases I have tried. I've tried using the c/c++ auto-close settings for 'insert padding' as on and off, and I've used the c/c++ context tagging Parameter Information-> Pad parentheses and Insert space after comma settings.

I see no examples of this behavior in the C/C++->Formatting window and I don't know how to apply this type of change. Is this type of setting possible with SE 2016 RC1?

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Beautify settings
« Reply #1 on: September 13, 2016, 04:28:37 PM »
This works for me.  In my beautifier profile (Tools -> Beautify -> Edit Current Profile menu is one way to get there), under Spacing -> Expressions -> Function/Method Calls, I turn on "Pad inside parenthesis", and turn off "Space between empty parenthesis".   Then when I type something like this:
Code: [Select]
    foo(a,b);

...when I type the ';', the code gets changed to
Code: [Select]
    foo( a, b );

At the very least, the context tagging setting you mentioned should probably not be a separate setting for languages that have beautifiers, but should be linked to the beautifier setting.  Otherwise, it is confusing.  Not as sure for the auto-close setting.

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Beautify settings
« Reply #2 on: September 13, 2016, 04:36:19 PM »
Thank you. I was concentrating on the Tools->Options menu and hadn't looked there. I'm trying those settings now. "Too many" settings can be confusing ;-) But I like the options that are available.