[Lazarus] Auto-identation

Mattias Gaertner nc-gaertnma at netcologne.de
Thu May 27 11:51:08 CEST 2010


On Thu, 27 May 2010 12:07:08 +0400
dmitry boyarintsev <skalogryz.lists at gmail.com> wrote:

> Hello Developers
> 
> Need your help and suggestion. I can't switch off the auto-identation.
> I've the option off in Editor->General->Indent and Tabs->"Auto indent"
> 
> But, whenever I'm typing:
> 
> for i:=1 to N do begin|  <-- press enter
> 
> I'm getting a new line indented 2 spaces (under "r"), instead of
> placing cursor under "f" (just like delphi does).
> (Btw, the same happens for "try")

http://wiki.lazarus.freepascal.org/IDE_Window:_Codetools_Options#Indentation

 
> However if I type
> for i:=1 to N do
> begin| <-- press enter
> 
> I have no indentation, and the cursor is placed right under "b"
> Why does it happen?

It should be the same and it works here. Can you update to svn rev
25683 and try again?
If it still does that, can you compile the IDE clean with
-dVerboseIndenter? This will write to stdout why it indents.

 
> What I want, is on pressing enter a new line starting at the same
> column as the previous line.
> any suggestions?
> 
> Btw. I can make Lazarus indent just like i need, but for this I must
> switch Auto-Ident ON, but switch OFF
> "CodeTools->General->Indentation>On break line". But such
> configuration seems VERY ODD to me.

The codetools are only for pascal files, the other for all other. I
will extend the captions to make this more clear.


Mattias




More information about the Lazarus mailing list