libtext-findindent-perl | module to heuristically determine indentation style | Mehr ...
Text::FindIndent is a Perl module that attempts to detect the underlying indentation "policy" for a text file (most likely a source code file). You give it a chunk of text, and it tells you if tabs, spaces or combination of both are used for indentation. . It honours Vim midelines and Emacs Local Variables settings.