Menu

#1770 Certain .c files will indent only 1 space instead of 4 on pressing tab

Bug
closed-invalid
5
2016-01-18
2015-10-17
b2f9h203
No

I have attached two .c files and my cpp.properties file.
If I open scite-no-indent-error.c and go to line 4 and press tab, then 4 spaces will be inserted.
But if I open scite-indent-errro.c and do the same, then only 1 space will be inserted.
Expected behavior: in both cases 4 spaces should be inserted.

3 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2015-10-17

    The indentaiton in scite-indent-error.c is inconsistent. Line 2 starts with 4 spaces and line 4 with 5 spaces, and thus line 4 is indented by a single space from line 2. An indentation of a single space appears viable and is chosen. If this is common in your files then indent.auto will not work as you want and you should use fixed indentation settings.

     
  • Neil Hodgson

    Neil Hodgson - 2015-10-17
    • labels: --> scite, indentation
    • status: open --> open-invalid
    • assigned_to: Neil Hodgson
     
  • b2f9h203

    b2f9h203 - 2015-10-18

    Ah thank you for hinting to indent.auto.
    But allow me this one argument: These type of multiline comments are pretty common in C/C++ in general and some editors even autoinsert those asterisks at 5 space indent after the first slash asterisk. In doxygen this style is also the standard style of documenting.
    http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html

    /**
     * ... text ...
     **/
    

    So I think it would be nice to have it supported.

     

    Last edit: b2f9h203 2015-10-18
    • Neil Hodgson

      Neil Hodgson - 2015-10-19

      I'll accept a patch for this feature but it isn't something I want so will not be implementing it myself.

       
  • Neil Hodgson

    Neil Hodgson - 2016-01-18
    • status: open-invalid --> closed-invalid
     

Log in to post a comment.