[Lazarus] Auto indentation

Paul Ishenin webpirat at mail.ru
Tue Nov 3 16:21:15 CET 2009


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]

procedure TForm1.Button1Click(Sender: TObject);
begin
|
end;

pasting at the cursor (|) result:
[code]
procedure TForm1.Button1Click(Sender: TObject);
begin
for i := 0 to 10 do
  if i = j then begin
    j := i;
end;
end;
[/code]


procedure TForm1.Button1Click(Sender: TObject);
begin
  |
end;

pasting at the cursor (|) result:
[code]
procedure TForm1.Button1Click(Sender: TObject);
begin
  for i := 0 to 10 do
  if i = j then begin
    j := i;
end;
end;
[/code]

Best regards,
Paul Ishenin.




More information about the Lazarus mailing list