Author Topic: .editorconfig and Beautifier  (Read 176 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1787
  • Hero Points: 174
  • Text
.editorconfig and Beautifier
« on: August 22, 2019, 12:41:59 am »
So, if I have
Code: [Select]
[*]
indent_style = tab
In .editorconfig, when I insert new text Slick will use tabs.

But, when I beautify, it replaces all those tabs with spaces.

Slick Tools -> Beautify -> Config -> Indent -> General
   Indent With Tabs
Is just on/off -- it doesn't have the tri-state (like Spacing -> decl -> Class -> Array -> "Pad Inside of []"
where there is a checkbox on the left to enable the feature, and an on/off switch to select which way.


Is there a way to get Beautify to honor the .editorconfig setting?

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1095
  • Hero Points: 100
Re: .editorconfig and Beautifier
« Reply #1 on: August 22, 2019, 01:21:02 pm »
Hmm, it was integrated in the same way that adaptive formatting was, in that beautifying selections, alias expansion etc take AF and the .editorconfig into account.  But when you beautify the whole file, just the profile is used without input from AF or .editorconfig.

For adaptive formatting we do that because it allows you to fix files with inconsistent formatting that are confusing AF, without having to turn AF off, beautify to get it into shape, and then turn AF back on. 

It might not make as much sense to do this with .editorconfig, since either you want to use the editorconfig settings or you don't.  There isn't a third "confused" state to worry about. I need to look into this more.

In the meantime, the only workaround I know of is to do a select-all and beautify - even though it's the entire file, the selection will make it pull in editorconfig changes.

jporkkahtc

  • Senior Community Member
  • Posts: 1787
  • Hero Points: 174
  • Text
Re: .editorconfig and Beautifier
« Reply #2 on: August 22, 2019, 04:33:02 pm »
Ahh... I had no idea that beautify of the entire file behaved differently that on selections.