<html><head></head><body><div class="ydp849e18b4yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div>Thanks, Matthew!<span> I was not aware of those features.</span> I'm switching to that usage and setting the project conversion-on-save options accordingly. For the record, I wouldn't drop default file extension dependency from the wishlist.<br></div><div><br></div><div class="ydp849e18b4signature"><div>Douglas Morris<br></div></div></div>
        <div><br></div><div><br></div>
        
        </div><div id="yahoo_quoted_7924180084" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Sunday, May 12, 2019, 3:11:59 PM PDT, Matthew Brush <mbrush@codebrainz.ca> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">On 2019-05-12 2:46 p.m., Douglas Morris via Users wrote:<div class="yqt5123638976" id="yqtfd26334"><br clear="none">> I would like the conversion of leading tabs to spaces for Python files and of leading spaces to tabs (but more importantly NOT vice versa) for Php files.  I am sure many of you have addressed this issue already and know how best to handle it in Geany. I don't see an obviously good way to handle it. I can only guess a special configuration file might do it, and call me lazy.<br clear="none">> <br clear="none">> Python (*.py):<br clear="none">> The custom and better way in Python is leading spaces not leading tabs. If spaces and tabs are mixed, the visual appearance is not indicative of actual block nesting. Per PEP 8, Python 3 forbids mixing (unlike Python 2) and prefers spaces, 4 for each indent level: PEP 8 -- Style Guide for Python Code.<br clear="none">> <br clear="none">> |<br clear="none">> |<br clear="none">> |<br clear="none">> |  |  |<br clear="none">> <br clear="none">>   |<br clear="none">> <br clear="none">>   |<br clear="none">> |<br clear="none">> |  |<br clear="none">> PEP 8 -- Style Guide for Python Code<br clear="none">> <br clear="none">> The official home of the Python Programming Language<br clear="none">>   |<br clear="none">> <br clear="none">>   |<br clear="none">> <br clear="none">>   |<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> Php (*.php):Wordpress recommends leading tabs: PHP Coding Standards | Wpcs Handbook Handbook | WordPress Developer Resources.<br clear="none">> <br clear="none">> |<br clear="none">> |<br clear="none">> |  |<br clear="none">> PHP Coding Standards | Wpcs Handbook Handbook | WordPress Developer Reso...<br clear="none">> <br clear="none">> <br clear="none">>   |<br clear="none">> <br clear="none">>   |<br clear="none">> <br clear="none">>   |<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> I see this: Preferences -> Editor -> Indentation -> 'Detect type from file'. It is not working for me. I know, barely, that one can create a custom Geany configuration file. Can one specify the correct behavior by file extension, and is that a good or best way?<br clear="none">> I notice on the Geany Plugin Wishlist this item (stale as it is):<br clear="none">> <br clear="none">> Feature found in Slickedit: Tabs to spaces option should be file extension dependent (i.e. you might want it most of the time but not e.g. for the .mak file extension). (Tuesday, September 29, 2009)<br clear="none">> <br clear="none">> For anyone who already knows, what is the state of affairs on this desirable functionality? What good is the 'Detect type from file' setting? My experiments have been fruitless.</div><br clear="none">> <br clear="none"><br clear="none">Generally I use Geany "projects" feature which lets you set the <br clear="none">indentation type for the whole project. If bringing in other files or <br clear="none">copy/pasting with the wrong indentation, I use `Document->Replace Tabs <br clear="none">with Spaces` (or vice versa) to correct the files.<br clear="none"><br clear="none">Regards,<br clear="none">Matthew Brush<br clear="none"><br clear="none">_______________________________________________<br clear="none">Users mailing list<br clear="none"><a shape="rect" ymailto="mailto:Users@lists.geany.org" href="mailto:Users@lists.geany.org">Users@lists.geany.org</a><br clear="none"><a shape="rect" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a><div class="yqt5123638976" id="yqtfd80911"><br clear="none"></div></div></div>
            </div>
        </div></body></html>