Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • So you expected the vim users to flog you with comments. I'm a vim user, but here's for something different:

    With *Padre*, you can configure your favourite indentation setting, then check the little box that says "automatic indentation finding" or somesuch and it'll use your own style for new files, but it will automatically adapt to the indentation style of existing files as you open them! It also honours the vim and emacs style magic comments that are used here or there for setting the indentation style.

    It's not perfect (yet), but works so well that I wonder why vim doesn't do it out of the box. I don't know about emacs, but I don't think it does that either.

    • Ok, that's damn hot. Now I will give Padre another look.

      • The really strange thing is that it's such a basic convenience feature that could and should be implemented anywhere.

        The current implementation of the indentation finding in Padre is actually pretty horrible. It's in the Text::FindIndent module on CPAN. (I hacked it up so I can bash it, too.) The one thing that breaks it occasionally is POD. If you have a lot of POD with verbatim blocks in it (where most people use spaces regardless of how they indent their code), they aren't ignored. That would be a rather