How to set file recognized as XML

Yametazamwa mara 26
Ruka hadi kwenye ujumbe wa kwanza ambao haujasomwa

Mac Mac

hayajasomwa,
24 Ago 2022, 17:50:5324/08/2022
kwa 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

hayajasomwa,
24 Ago 2022, 18:01:0424/08/2022
kwa 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

hayajasomwa,
25 Ago 2022, 08:07:1325/08/2022
kwa 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

hayajasomwa,
25 Ago 2022, 18:46:0525/08/2022
kwa 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

hayajasomwa,
27 Ago 2022, 13:44:3627/08/2022
kwa scite-interest
Thanks! That was it.
Jibu wote
Mjibu mchapishaji
Sambaza
Ujumbe 0 mpya