Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-05

Auto-identation

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

dmitry boyarintsev

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")

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?

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.

thanks,
dmitry

Reply by email

Mattias Gaertner
to dmitry boyarintsev
Show quoted text 12 lines
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

Show quoted text 6 lines
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.

Show quoted text 8 lines
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

Reply by email

dmitry boyarintsev
to Mattias Gaertner
Mattias Gaertner wrote
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.

Thank you.
I'll test it later tonight.

regards,
dmiitry

Reply by email

dmitry boyarintsev
to Mattias Gaertner: On Thu, 27 May 2010 12:07:08 +0400 http://wiki.lazarus.freepascal.org/IDE_Window:_Codetool…
Mattias Gaertner wrote 11 lines
> 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.

Ok. It does work now.

thanks,
Dmitry

Reply by email