[SOLVED] automatic indentation is not working with tabs

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] automatic indentation is not working with tabs

    Hello Segger Team,


    when Tabs are configured, spaces are still used for automatic indentation.

    For example this code from the default project:



    When pressing enter at the end of the line with the printf-statement to enter an additional printf statement, spaces are used to intend.



    In addition, the default values of the options are bit uncommon. Why distinguish between “Tab Size” and “Indent Size”? When “Tab Size” is not identical to “Indent Size” the Indentation is filled with spaces. Why differentiate here?
    In addition, the default size of eight columns for the “Tab Size” is also very uncommon. I think four is used most and should therefore be default.



    Regards
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Could you provide your exact settings that you have changed that lead to said behaviour?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Nino,


    I’ve only enabled the „Use Tabs” Setting for C and C++ like this:

    Tools --> Options --> Languages



    And I enabled the visibility of white spaces to make the behavior better observable

    Edit --> Others --> Visible White Spaces

    Use the default project and ‘tabbify’ it like this:



    Press Enter after the printf-statement. Embedded Studio is automatically intending to the level of the printf statement. If you type a new statement here it is intended with spaces instead of tabs.



    Should be easy to reproduce.


    Best Regards
  • Hello,

    Thank you for providing the option information.
    With it the behaviour is reproducible.
    We are currently investigating.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.