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 ?
Do you have the SmartIndentCpp plugin enabled?
Quote from: oBFusCATed on February 17, 2018, 11:32:34 AM
Do you have the SmartIndentCpp plugin enabled?
Yes, it is already enabled.
Then you should post the exact steps needed to reproduce the problem on a simple example file.
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.
Consider this:
#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;
}
Now I click to the end of last printf and I press Enter:
#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;
}
Same happens for first printf too.
Works correctly for me...
Are you sure you have the auto indent or smart indent or whatever it is called enabled?
Settings -> Editor
Indent option make sure "Auto Indent" is checked.
Tim S.
Quote from: stahta01 on February 17, 2018, 05:08:39 PM
Settings -> Editor
Indent option make sure "Auto Indent" is checked.
Tim S.
Ok, I enabled "Auto Indent" as you said, and the problem seems to be gone.