[Padre-dev] Automatic indentation style detection

Steffen Mueller smueller at cpan.org
Thu Nov 20 09:42:02 PST 2008


Dear Padre devs,

as a stop-gap measure to more proper solutions, I've added a "Guess 
indentation style" button to the preferences dialog which infers the 
indentation settings from the current document.

Behind the curtains, it uses the new Text::FindIndent module. That 
module is a big regexp hack. Starting with version 0.02 (which I just 
uploaded) it respects some options in vim modelines. (No emacs support 
yet, but patches welcome.)

I'd appreciate if you tried to break it*. Note that Padre has no setting 
for "mixed" tab/space indentation mode where the indentation level can 
be an arbitrary number of columns, but every eight spaces are replaced 
by tabs. (This is a scarily common setup!)

Best regards,
Steffen

* and even more so if you supply a patch to fix it!


More information about the Padre-dev mailing list