Hello,
This is a standard function of most text editors, that code-blocks and another ms product that shall remain unnamed don't seem to come with as standard...
I thought the long awaited jump from text editor(VI) to IDE would be a painful process and hence I put it off for a little over 7months. Anyway, back to the topic, I can't seem to find where to enable this, I tried making a autocompletion (ctrl +J) function called by pressing {{ and ctrl J, this didn't work.
can anyone please shed some light on how I can get automatic closing brackets and/or inverted commas ?
Sorry, I can't fully understand your question.
Did you want to jump from the open brace to close brace?? just use CTRL+SHIFT+B. :D
It would be really helpful to know which version of C::B you use and which os (and version) you use.
CB 8.02 windows 7.
on a large number of text editors when you open a new brace '{' bracket '(' '[' an enclosing one is put directly after the cursor. or in case of the curly brace is put 2 lines below and the cursor jumps the to the next line with -> 1 indent. less frequent editors also have this inclusion for inverted commas. so when you type one, a second one(closing comma) is placed directly after the cursor.
eg _ = cursor
// i type {
{
_
}
// i type (
int main(_)
// i type [
int [_]
// i type "
string str1="_"
You should use a recent nighly build (http://forums.next.codeblocks.org/index.php/board,20.0.html), both features are implement in the meantime.
Are you sure?
I just downloaded and installed the Nov (svn 5911) release and it's not working.
You have to check "Settings -> Editor... -> General settings -> Indent options -> Brace completion" and it works only for C/C++- and D-sources/headers.
thank you, for some reason it was ticked but was just being buggy, when I closed it down and restarted the computer it worked.
Hi,
I'm looking for the same feature as the OP but I can't seem to find "Brace Completion" checkbox here.
[attachment deleted by admin]
As I posted before:
Quote from: jens on December 15, 2009, 04:56:04 PM
You should use a recent nighly build (http://forums.next.codeblocks.org/index.php/board,20.0.html), both features are implement in the meantime.
Thanks, I missed that part of the thread
This is still kind of buggy, sometimes this doesn't work at all, for instance in non cpp file types.
Sometimes it doesn't work in cpp files either if I'm outside of a class block or something... But then other times it does.
Would love to see auto comment completion as well. :shock:
/* enter :
/*
* _
*/
and for javadocs, /**
/**
* _
*
* @param argc
* @param argv
* @return
*
**/
int main(int argc,char *argv[])
{
...
QuoteThis is still kind of buggy, sometimes this doesn't work at all, for instance in non cpp file types.
it works only for C/C++- and D-sources/headers.
Quote from: blueshake on December 19, 2009, 01:12:49 AM
QuoteThis is still kind of buggy, sometimes this doesn't work at all, for instance in non cpp file types.
it works only for C/C++- and D-sources/headers.
Exact what I wrote before:
Quote from: jens on December 15, 2009, 05:29:55 PM
You have to check "Settings -> Editor... -> General settings -> Indent options -> Brace completion" and it works only for C/C++- and D-sources/headers.
Please read the posts carefully.
And for the not working brace-completion in c/cpp-files, please post exactly what you do if it happens, so anyone can reproduce it.