3

Every time I try to change the default application to open .cfg files, all .tex files are automatically set to be opened with the same application, and vice-versa. This is problematic since I would like to open .cfg files with TextEdit and .tex files with Texpad. Is there a way to do this ?

I don't know what causes this behavior, here's what I already tried:

  • Set various editors as default app using the standard method (File > Get Info > Open With > Change All). I tried with TextEdit, Textmate, Atom, Texpad on both types of files.

  • Set default app using duti.

  • Edit ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist to manually add entries then restart, as suggested here. The entries I edited are the following:

    {  LSHandlers = (
       ...
         {  LSHandlerContentType = "com.vallettaventures.texpadm.tex";
            LSHandlerPreferredVersions = { LSHandlerRoleAll = "-"; };
            LSHandlerRoleAll = "com.vallettaventures.texpad";
         },
         {  LSHandlerContentTag = "cfg";
            LSHandlerContentTagClass = "public.filename-extension";
            LSHandlerPreferredVersions = { LSHandlerRoleAll = "-"; };
            LSHandlerRoleAll = "com.apple.textedit";
         },
       ...
       );
    }
    

Unfortunately, none of these approaches have worked.


System: I am running macOS 11.3.1 on an Intel MacBook Air.

You must log in to answer this question.

Browse other questions tagged .