How to set file recognized as XML

21 views
Skip to first unread message

Mac Mac

unread,
Aug 24, 2022, 5:50:53 PMAug 24
to scite-interest

I am working with xml that is stored in a file with an extension other than .xml.

What is the correct way to add additional file extensions to be recognized as an xml file?


Is this something that could be added to ~/.SciTEUser.properties ?


Neil Hodgson

unread,
Aug 24, 2022, 6:01:04 PMAug 24
to scite-interest
Mac Mac:

> I am working with xml that is stored in a file with an extension other than .xml.
>
> What is the correct way to add additional file extensions to be recognized as an xml file?

Open the html.properties file which is also responsible for XML. At the start, there are definitions for which file patterns to treat in certain ways. Copy the file.patterns.xml setting to user properties and modify it as needed.

Neil

Mac Mac

unread,
Aug 25, 2022, 8:07:13 AMAug 25
to scite-interest
Hmm...I added the following line to ~/.SciTEUser.properties :

file.patterns.xml=*.xml;*.xsl;*.svg;*.xul;*.xsd;*.dtd;*.xslt;*.axl;*.xrc;*.rdf;*.cfg

When I open a .cfg file it still is not seen as xml, I need to do a Shift-F12 to get xml highlighting.

Neil Hodgson

unread,
Aug 25, 2022, 6:46:05 PMAug 25
to scite-interest
Mac Mac:

> file.patterns.xml=*.xml;*.xsl;*.svg;*.xul;*.xsd;*.dtd;*.xslt;*.axl;*.xrc;*.rdf;*.cfg
>
> When I open a .cfg file it still is not seen as xml, I need to do a Shift-F12 to get xml highlighting.

cfg is a popular extension which is also used by file.patterns.props so there is a clash that you should resolve by changing file.patterns.props.

Neil

Mac Mac

unread,
Aug 27, 2022, 1:44:36 PMAug 27
to scite-interest
Thanks! That was it.
Reply all
Reply to author
Forward
0 new messages