cherrytree icon indicating copy to clipboard operation
cherrytree copied to clipboard

SOLVED: Pairing *.ctd with Sublime Text leads to XML corruption

Open gitvectors opened this issue 3 months ago • 0 comments

Is your feature request related to a problem? Please describe. Problem is that I experimented with fine tuning a CT *.ctd file (older version 1.4) by opening *.ctd in paired Sublime Text. This is possible since Sublime Text regards *.ctd as XML syntax (if Sublime Text XML syntax package is installed) and therefore the inner nodes can be edited and features in Sublime Text can be leveraged such as including snippets in Sublime Text. In theory. The mistake I made was trying this on a master *.ctd file rather than first cloning and trying on the clone. But the *.ctd file was corrupted. Trying XML Copy Editor the files shows not valid XML.

Describe the solution you'd like Some built in recovery process to analyse and validate *.ctd as XML would be helpful. Meanwhile do not try this experiment on an original *.ctd as I did.

Some safe process of launching *.ctd in paired XML tools such as Sublime Text, XML Copy Editor to diagnose XML syntax errors in toolchain exchanges. I use *.ctd in a cluster of tools.

Meanwhile I can explore using Sublime Text tools to validate corrupted *.ctd file.

....

Moving on I explored through my AI Agent my ideas and have devised a "safe *.ctd editing" script (UserAction in Krusader) which should prevent corruption. Also added some XML validation packages into Sublime Text. I will write these up later.

....

SOLVED. In Sublime Text with LSP-lemminx Once you have LSP-lemminx installed, it will: Highlight these errors with red squiggly lines Show error messages when you hover Prevent you from saving invalid XML (with proper settings)

I found that I had written "R&D" where it should be "R&ampD". After fixing and no errors seen in bottom status bar I could save and open normally in CT. Lesson learned. Sublime Text is an excellent partner since multiple snippets can be added to CT *.ctd syntax.

gitvectors avatar Oct 03 '25 08:10 gitvectors