[DUG] D2006 Problem indenting lost
John Bird
johnkbird at paradise.net.nz
Thu May 11 19:28:30 NZST 2006
This is the worst gripe I have about D2006. It is minor enough, but is
driving me a bit batty: Old code I had nicely formatted in D5 gets all
jumbled when I look at it in D2006. I am getting tired of reformatting code
that has gone like:
if alphasearch = false then
begin
searchlhs:=6;
searchlen:=10;
codesrch:=format('%7s',[Searchstring])+' '; //puts in 7
spaces
if dotpos > 0 then
begin
codesrch:=format('%7s',[copy(Searchstring,1,dotpos-1)])
+copy(Searchstring,dotpos+1,3);
if length(codesrch) < 10 then
begin
codesrch:=codesrch+'000';
setlength(codesrch,10);
end;
end;
x:=7;
if dotpos > 0 then x:=10; //leave .000 as spaces
for tmpptr :=1 to x do
if codesrch[tmpptr] = ' ' then
codesrch[tmpptr]:='0';
end;
As far as I can tell I only have to tidy it up once, but I keep hitting it
when I look at old code - it really looks like it has lost the plot. Lots
of code indented an extra 3 tabstops, but not all consistent, a lot of
saw-tooth effects like here.
Anyone else struck this?
Are there any settings I should change?
(I am guessing the old code may have been formatted with a mixture of spaces
and tabs?)
Is this a known D2006 problem?
As far as I have found there is no code formatting tool in D2006 - I have
seen eg a beautify code option in Foxpro, this would be handy here. I see
some nice component alignment tools, but nothing for code.
I should say, as annoying as it is, the other IDE features are more than
worth it.
John
More information about the Delphi
mailing list