Edit: Using 3.3.3
Indentation has got to be one of the must bustificated features of PHPEd, and it's one of the most important. I posted about some of this almost a year ago, I think, but was kind of blown off at the time.
Set your options like this:
Smart Indent
Use Tab Char
Smart Tabs
Optimal Fill
Spaces in tab: 8
Block indent: 4
And then start playing with this:
if (foo) {
bar;
} else {
baz;
} |
Select the block, indent it twice. Great.. it indented. You notice that it didn't use the 4-space indentation it's supposed to? So did I.
Reset the code block
Next, turn off Use Tab Char.
Select the block, indent it three times. What's that? It indented, but it wouldn't go beyond two levels, and it forced all of the code to the same indentation? Yeah. Indent it a few more times. It doesn't go anywhere.
Reset the code block.
Indent a single line (without selecting it first. Just press home, and then tab.)
It indented a full tab-space, and not the 4-space indentation?
Now, for the finale:
Reset the code block
Turn off Use Tab Char
Turn off Smart Tabs
Indent the block twice, same as above. Now, press Ctrl-Z to undo.
WHAMMO ... look at that. The
first eight characters of your code have dissapeared. This is not undo-able. I hope you saved before indenting...