Author Topic: How to get the indentation right with SlickEdit for the following cases  (Read 2742 times)

pagupta

  • Community Member
  • Posts: 30
  • Hero Points: 1
I have SlickEdit 2012 (v17.0.3.0 64-bit)
-----------------------------------
With SlickEdit is there a way I can get the desired formatting rather than actual one?
I have checked that in my options the 'goto labels' indent is off.

Desired formatting :
Code: [Select]
VOID foo() {
    ULONG abc;
    goto Exit;
Exit:
    return 0;
}
Actual formatting :
Code: [Select]
VOID foo() {
    ULONG abc;
    goto Exit;
    Exit:
        return 0;
}
---------------------------

Also DESIRED FORMATTING
Code: [Select]
VOID
GetFoo();

class foo {
    VOID
    GetObj();
};

ACTUAL FORMATTING

Code: [Select]
VOID
GetFoo();

class foo {
    VOID
        GetObj();
};

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: How to get the indentation right with SlickEdit for the following cases
« Reply #1 on: August 27, 2014, 12:42:13 PM »
The placement of the "Exit:" is working correctly in V17.0.0 and in V18 for me.  I don't have V17.0.3 to try.  Are you setting the options for the correct language  - click "document" on the menu then "C/C++ options" ??
« Last Edit: August 27, 2014, 01:24:43 PM by Graeme »

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: How to get the indentation right with SlickEdit for the following cases
« Reply #2 on: August 27, 2014, 03:54:00 PM »
Interesting, I can reproduce it.  While the beautifier would beautify the code the way pagupta wants it if the file was batch-beautified, the editing code isn't honoring those settings.  (and in this case, "Beautify while typing" only works for the second case, in some scenarios it would not adjust the label indent).

It may be a bug for the label indent, I could have swore we looked at the beautifier settings for that case.

pagupta

  • Community Member
  • Posts: 30
  • Hero Points: 1
Re: How to get the indentation right with SlickEdit for the following cases
« Reply #3 on: August 29, 2014, 08:50:45 PM »
Thanks Graeme and Patrick.
Patrick, I presume you would be fixing this in Slick Edit. Would be fix be available for SlickEdit 2012 (v17.0.3.0 64-bit) ?