Suppose that I have this code:
If I put the cursor in line 4 (below "int b;"), it is located at the beginning of the line. Now, if I click the "Enter" key, I would expect the cursor to be at the beginning of the line + one tab. Instead, it is located at the beginning of the line. This is annoying when you write lots of code.
Another issue:
void foo1(int a, int b)
{
printf("abcd %d %d",);
}
Now, I put the cursor after the "," in the printf line. I click the "Enter" key, and the cursor moves to the next line below the "p" char. How can I make it be below the opening " char (i.e one tab + strlen("printf") + 2 from the beginning of the line)?
Thanks,
Erez
It depends on your OS and from where you installed C::B.
If you are on linux, you have to install the codeblocks-contrib packages.
If you are on debian and have the codeblocks-conrib packages installed, you might need to run sudo dpkg-reconfigure codeblocks-contrib
and make sure the appropriate plugins are selected.
If you build from sources, you need to run configure with the --with-contrib-plugins=xxx parameter, where xxx is either all for all contrib-plugins or any comma-seperated list of contrib-plugins.
Call configure with --help to see the exact spelling.
Thanks. I was able to use the SmartIndentCPP plugin. This solved the problem that I described in foo1() but didn't solve the problem in foo().
And here's another problem:
void foo2(int a, int b)
{
printf("abcd %d %d",
a,
b);
}
If I put the cursor in line 5 just after the ";" char and click "Enter", I would expect that the cursor will jump to the next line, 1 tab after the beginning of the line. Instead, it is located below the "b" char (i.e. still indented for the printf() function). This seems wrong to me.
Erez