There is no off-the-shelf solution as PyCharm does not seem to be aware of the extension type in question (.ui
), but I guess using the Register New File Type Association Dialog would suffice as a workaround:
- Open matching files in PyCharm
When this option is selected, PyCharm treats the type of the file to be opened as one of the recognized file types. Choose the relevant type from the list box below, that displays all the file types recognized by PyCharm.
In this text box, specify the file pattern to be associated with the selected file type. By default, the text box shows the following pattern: *.<current file full extension>.
- Open matching files in associated application
When this option is selected, PyCharm attempts to open the selected file using its native application, if this application is available.
You could also look into this documention if you wish, but admittedly, editing ui files with an xml editor, while it is possible, is not ideal!
To associate a file type with extensions
- Open the File Types settings page.
- From the Recognized File Types list, select the desired type.
- In the Registered Patterns area, complete the list of patterns that define the file > extensions to indicate that the corresponding files belong to the selected type. Do one of the following:
- To register a new pattern, click add (Alt+Insert) and enter the desired extension pattern in the Add Wildcard dialog box that opens.
- To update a pattern, select it in the list, click the Edit button edit1 and make the necessary changes in the Edit Wildcard dialog box that opens.
- To remove a pattern from the list, select it and click delete (Alt+Delete).
Therefore, you could basically associate the *.ui
pattern with XML as UI files are implemented as XML for better or worse.