[Geany] auto indentation

Enrico Troeger enrico.troeger at xxxxx
Fri Jan 27 01:13:45 UTC 2006


On 01/20/06 05:22, Tamim wrote:
Hi,

> auto indentation problem has not yet been solved. There are problems. 
> I've attached a simple prime generator code. Try this:
I think the mentioned problems should be fixed. The fixes are in CVS,
and will go to the 0.5 release. I think I will release it tomorrow.

> 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.
I'm not sure whether to implement this. To do this, I have to check and
parse at least one line above the current line, and detect an for, if,
whatever. This would be lots of work, and probably would slow down Geany
more than necessary. Again, perhaps I will do this in the future, but
I'm unsure.


Thanks,
Enrico




More information about the Users mailing list