Author Topic: Beautifier Profile Override ignored by language Formatting  (Read 1098 times)

timur

  • Senior Community Member
  • Posts: 205
  • Hero Points: 3
I work on two C-language projects that have very different formatting standards.  I have a beautifier profile in the top directory of each project. 

I don't run the beautifier on the projects because that would change hundreds of lines any any file.  Instead, I want the editor formatting to be correct.  So in project A I want tabs to be 4 spaces, and in project B I want them to an 8-space hard tab.

It appears that when I switch projects, Slickedit does not switch formatting profiles, and whenever I edit project A, I get the settings for project B instead.  I have to manually switch the formatting every time.  And when I do switch project A, then I need to switch back when I edit project B.

Is there any way to fix this?  I'm using Slickedit v23 on Linux.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6862
  • Hero Points: 528
Re: Beautifier Profile Override ignored by language Formatting
« Reply #1 on: May 15, 2020, 01:59:39 AM »
Have you defined Beautifier Profile Overrides? Tools>Beautify>Beautifier Profile Overrides

timur

  • Senior Community Member
  • Posts: 205
  • Hero Points: 3
Re: Beautifier Profile Override ignored by language Formatting
« Reply #2 on: May 15, 2020, 04:18:56 AM »
Yes, that's what I mean when I said "I have a beautifier profile in the top directory of each project."  I guess technically it's a beautifier profile override.  And the beautifier does see it.  But the formatting options do not.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6862
  • Hero Points: 528
Re: Beautifier Profile Override ignored by language Formatting
« Reply #3 on: May 15, 2020, 01:13:48 PM »
Keep in mind, the directory your workspace or project file is in does not determine which Beautifier Override profile is used. Only the directory of the source file determines which Beautifier Override is used. SlickEdit searches up the directory tree for each source file to figure out which Beautifier Profile Override to use.

Which beautifier formatting option isn't using the correct override when you switch files/directories?

As a test, I created two beautifier profiles with different brace styles for different directories. I edit a file from both directories which have different Beautifier override profiles defined. I try syntax expansion and beautify while typing and then switch files.  I get the correct brace style for each file. I actually had a workspace open but the files I edited were not in any project. Beautifier profile overrides have nothing to do with the currently open workspace/project.