[Geany] auto indentation

Tamim amitamim at xxxxx
Fri Jan 20 04:22:57 UTC 2006


auto indentation problem has not yet been solved. There are problems. 
I've attached a simple prime generator code. Try this:

1) add a function definition before main() like :

int foo(int a) {
}

Currently(cvs geany), I get this :

int foo(int a) {
     }

2) try adding a for loop inside the main like this :

for(i = 0; i < 10; i++) {
}

But in geany, I get this:

for(i = 0; i < 10; i++) {
   }

3) after the last printf on line 17, when you press enter after the 
printf (i.e. you want to add some more code after that printf) it'll go 
to the next line with the same amount of indentation as the printf(...). 
But this should not happen because of the way I wrote the code. The next 
line should have the same amount of indentation as the for loop. Example:

A)

for(i=0;i<10;i++) [press enter here]
       [it should be indented like this]
[but not this]

B)

for(i=0;i<10;i++)
       j++; [press enter here]
       [should NOT be indented like this]
[SHOULD be indented like this]

Thus, it's clear that when not using braces auto indentation doesn't 
really work.

There are some problems with the interface which I mentioned before. 
I've decided to actually edit the glade file and try to make it follow 
HIG and send it to you soon.



More information about the Users mailing list