[Lazarus] Auto indentation

Mattias Gärtner nc-gaertnma at netcologne.de
Tue Nov 3 17:05:19 CET 2009


Zitat von Paul Ishenin <webpirat at mail.ru>:

> Paul Ishenin wrote:
>> Mattias Gärtner wrote:
>>> * If you don't like other people styles, and always want to your  
>>> indentation you can turn the context sensitivity off. Then it will  
>>> only search in your example.
>> choosed this option to test
>>> * When pasting code the indenter will indent the whole block -  
>>> every line by the same amount.
>> and pasted the next code to check how indentation works:
> More examples:
>
> the code in the buffer is:
> [code]
> for i := 0 to 10 do
> if i = j then begin
>  j := i;
> end;
> [/code]

Just a note:
The indenter indents the pasted block as whole, not every line.
This has pros and cons. Maybe eventually an option can be added to  
indent instead every line. Indenting every line means bad and good  
indenting will be undone. IMO this is the inferior technique.
With the current synedit line ranges only the line-indenting can be  
implemented.


Mattias





More information about the Lazarus mailing list