Author Topic: SlickEdit 2012 v17.0.2 - New Feature: Beautify while typing. I use it every day.  (Read 5811 times)

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6868
  • Hero Points: 528
Hi Everyone,
 
I wanted to take the time to tell you about the new "Beautify while typing" feature for C++ and Objective-C we added to SlickEdit 2012 (v17.0.2). This feature is off by default, which means many users won't ever know this valuable feature exists. If you are editing C++ or Object-C, I highly recommend you turn it on. I have this turned on by default and love it. Previously, my code was indented properly thanks to SlickEdit but I avoided putting in any extra spacing simply because it was too much manual work. This made my code less readable. Now I let SlickEdit beautify my code when I type a semicolon, open brace, or close brace.
 
To turn on this feature:
  • Edit a C++ or Object-C file
  • Turn on Document>(C++/Object-C) Options>General>Beautify while typing
  • Press OK

It's a good idea to create a beautifier profile customized in the style your company/project desires. Edit a C++ or Object-C file and go to (Tools>Beautify>Options) to create and customize your own profile. The "Edit..." button allows you to modify the profile settings.
 
I hope you enjoy this feature as much as I do.
 
I welcome your thoughts on this exciting new feature.
 
Thanks!
 
Clark
« Last Edit: August 13, 2012, 03:05:11 PM by Jeffrey »

pcrook

  • New Community Member
  • Posts: 1
  • Hero Points: 0
I would love to have this feature if I understand it correctly.  However, I have always been puzzled by the difference between the language-specific formatting options, which affect code as you type, and those of the Beautify function. I'd expect one set of configuration parameters to apply to both typing and selective beautification.  Does this separation persist in v17?

I'm also hoping there will be finer-grained control of formatting options. For example, in v16 (C++) I chose a begin-end brace of style 2, but if I type a brace at the end of the line and hit return, style 1 is applied. If I type a brace after a case statement, it gets formatted as style 3. I can't find configuration that always gives me style 2 for all braced blocks.  Padding is another issue. I have checked the box "Insert padding between parentheses", but it isn't applied to the parentheses of function parameters.  I'd like the ability to specify a space after an opening parenthesis and before the closing one such as Eclipse provides.  Are any of these issues addressed in v17?

Thanks.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
@pcrook: See the v17 docs here
The User Guide describes the new, greatly enhanced beautifier.
HS2

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6868
  • Hero Points: 528
V17 has a boat load of formatting options and the formatting/Beautifier options are the same options used by smart editing. Currently only C++ and objective-C support these improvements but we plan to support more languages.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Just to chime in, the configuration is unified in v17 for the languages that fall under the new beautifier.  (in v17, C++ and Objective-C).  There's only one place to set the indent, tab, brace  style, etc...

And it does support the things you listed:
  •     Moving the brace to the correct style 2 position when you type it.
  •     Option to have the brace under a case statement to indent to the same indent level as the 'case'.
  •     Separate brace style settings for different statements and declarations.
  •     Separate padding settings for control statements, function calls, expression parenthesis.  With "Beautify while typing" enabled, it will put the padding in for you as you type.

   


pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Thanks for posting about this new option, I really like it.  So far I've found that when the auto-beautifier does something I don't like, I'm able to correct the core beautifier options easily.  Thanks Slickedit team for this great feature, and Clark for pointing it out.

Peter