[Closed] Custom file associations: The ones at the bottom should override the ones at the top, not vice versa

Features wanted...
Post Reply
John_C
Posts: 336
Joined: 16 May 2018 20:04

[Closed] Custom file associations: The ones at the bottom should override the ones at the top, not vice versa

Post by John_C »

I would call it not a "wish" but a small UI fix.

Currently, when you open the Customize File Associations window (Ctrl+F9), custom file associations at the top of the list override custom file associations that are below them.

Code: Select all

So, if you consider .html files as "text" ones,
but you want to open them by default in Edge and not in Vim,
you will have:

html>%ProgramFiles%\Microsoft\Edge\Application\msedge.exe
{:Text}>C:\prgfiles\vim\vim90\gvim.exe
I would say this order doesn't make sense and it should be the opposite: custom file associations at the bottom of the list should override custom file associations that are above them.

Code: Select all

So, if you consider .html files as "text" ones,
but you want to open them by default in Edge and not in Vim,
you will need:

{:Text}>C:\prgfiles\vim\vim90\gvim.exe
html>%ProgramFiles%\Microsoft\Edge\Application\msedge.exe
Last edited by John_C on 15 Aug 2022 16:50, edited 2 times in total.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Custom file associations: The ones at the bottom of the list should override the ones above them, not other way arou

Post by highend »

It's a first come, first serve.

Just use an entry for for the open with menu or a script that does what you want here

Code: Select all

    $modKey = <get shift>; // 0 = No keys held, 1 = Shift, 2 = Ctrl, 3 = Ctrl + Shift, 4 = Alt, 5 = Shift + Alt, 6 = Ctrl + Alt, 7 = Ctrl + Shift + Alt
    if ($modKey == 1) {
        run lax("%ProgramFiles%\Microsoft\Edge\Application\msedge.exe" "<pfaitem>");
    } else {
        run lax("C:\prgfiles\vim\vim90\gvim.exe" "<pfaitem>");
    }
One of my scripts helped you out? Please donate via Paypal

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Custom file associations: The ones at the bottom of the list should override the ones above them, not other way arou

Post by John_C »

This is a useful snippet, thanks. But what I'm talking about is simply that the current order looks unnatural. Of course, we can find some metaphors (like "first come, first serve"), but they won't fix its unnaturalness.

Why not from top to bottom? This is how we read books and this is, fwiw, how we redefine variables in code.

update:

I have just discovered that the same logic is used for age circles:

Code: Select all

<=  5 n >ff0000
<=  5 n >000000
the circle will be red, not black
So it seems it is by intent, though I completely disagree with this design decision ...

Post Reply