User forums > Help

Indentation ignored

(1/2) > >>

ordak:
Hi,

When I write C code in a line and press Enter, The cursor goes to the beginning of next line. At times this would be ignoring of indentation. What can I do in this regard ?

oBFusCATed:
Do you have the SmartIndentCpp plugin enabled?

ordak:

--- Quote from: oBFusCATed on February 17, 2018, 11:32:34 am ---Do you have the SmartIndentCpp plugin enabled?

--- End quote ---

Yes, it is already enabled.

oBFusCATed:
Then you should post the exact steps needed to reproduce the problem on a simple example file.

ordak:

--- Quote from: oBFusCATed on February 17, 2018, 03:17:33 pm ---Then you should post the exact steps needed to reproduce the problem on a simple example file.

--- End quote ---

Consider this:


--- Code: ---#include <stdlib.h>
#include <stdio.h>

const static char SI[]="name.ex";

int main(int argc, char *argv[])
{
    int i = 0;
    for (i = 0; i < argc; i++) {
        printf("argv[%d] = %s\n", i, argv[i]);
    }

    printf("%s \n",SI);
    return EXIT_SUCCESS;
}

--- End code ---

Now I click to the end of last printf and I press Enter:


--- Code: ---
#include <stdlib.h>
#include <stdio.h>

const static char SI[]="name.ex";

int main(int argc, char *argv[])
{
    int i = 0;
    for (i = 0; i < argc; i++) {
        printf("argv[%d] = %s\n", i, argv[i]);
    }

    printf("%s \n",SI);
//cursor comes to the beginning of this line.
    return EXIT_SUCCESS;
}


--- End code ---

Same happens for first printf too.

Navigation

[0] Message Index

[#] Next page

Go to full version