Author Topic: A question about Beautifying Code  (Read 741 times)

Ciky_Yin

  • Community Member
  • Posts: 14
  • Hero Points: 0
A question about Beautifying Code
« on: February 24, 2023, 08:52:54 AM »
When I edit a file written by someone else, and the beautification  type of this file is different from mine,the editor will format my new text as the type of this file,but not mine. I don't want to change the type of the whole file, just my new text.  How to set? Thank you!

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: A question about Beautifying Code
« Reply #1 on: February 24, 2023, 07:55:06 PM »
You must set the beautifier settings to what you want even if you don't use the beautify commands. This will allow new code to be formatted according to your beautifier settings.

Also, you could try turning on "Beautify while typing".  Tools>Options>Languages>Application Languages>C/C++/Editing. This will affect typing ';' and typing '}'. Typing ';' beautifies the statement and typing '}' will beautify the whole block.

LBCEi

  • Senior Community Member
  • Posts: 261
  • Hero Points: 21
Re: A question about Beautifying Code
« Reply #2 on: February 24, 2023, 09:06:12 PM »
Correct me if I'm wrong @Ciky_Yin, but I believe what you are saying is that you have your beautifier settings set the way you want them, but SE is detecting the formatting of the new file and beautifying any new code you enter according to that instead of according to your preferences.
« Last Edit: February 24, 2023, 09:08:00 PM by LBCEi »

Ciky_Yin

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: A question about Beautifying Code
« Reply #3 on: February 25, 2023, 04:56:55 AM »
@LBCEi Yes,you are right. I have turned on "Beautify while typing".
Correct me if I'm wrong @Ciky_Yin, but I believe what you are saying is that you have your beautifier settings set the way you want them, but SE is detecting the formatting of the new file and beautifying any new code you enter according to that instead of according to your preferences.


Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: A question about Beautifying Code
« Reply #4 on: April 11, 2023, 05:26:56 PM »
Did this issue get resolved?