Page 1 of 2
no XML highlighting for 40M XML file
Posted: 13.06.2021 09:49
by ertank
Hello,
I sometimes use considerably big XML files like 4-5MB in size. When I open such a file, I see no XML highlighting as I used to see in smaller files. I tried to find setting about highlighting file size limit but I could not.
Is there anything that I can to to make it work such files color displayed?
Thanks & Regards,
Ertan
Posted: 13.06.2021 10:40
by uvviewsoft
This is
"ui_max_size_lexer": 2
but... for XML bigger than 2Mb you must see XML^ lite lexer active! so coloring must be present anyway. It is file data/lexliblite/XML.*
Posted: 18.06.2021 11:00
by uvviewsoft
Pls upload that big XML file, so I can test on it.
Posted: 19.06.2021 19:40
by ertank
Attached is an xml file sample big in size.
Posted: 19.06.2021 20:15
by uvviewsoft
Ahh! It is 42M file which has SINGLE LINE (no EOLs). CudaText don't highlight lines >4000chars. sorry. Atom editor also does this. (VSCode too?)
Posted: 19.06.2021 20:26
by ertank
I don't use Atom editor or VSCode for such files. Cannot comment for them.
I confirm Notepad++ highlights that particular file as a single line.
BTW, my intention is not highlighting it as a single line. First, I "pretty print" (convert to indented multi line) it and after start working on it.
I do not know if I can set a limit for XML formatter to have it work on such file. When I check plugin options I only see tab_size and max_width
Posted: 19.06.2021 20:31
by Alexey
If you use pretty-print (in CudaText the CudaFormatter exists) you can work with it. syntax will be hilighted for lines<4000 chars.
So install CudaFormatter + XML-formatter, call it to format.
Did you try CudaFormatter + XML formatter?
Posted: 19.06.2021 20:34
by Alexey
Ah! I see that CudaFormatter don't work for 'XML^' lite lexer! will fix that soon.
Posted: 19.06.2021 21:46
by uvviewsoft
The addon was fixed now- 'formatter: XML_Pretty_Print'. it supports XML^ lexer. But for your example 40M file I got such result - broken encoding, again. so I guess file is not good UTF8 text.
Posted: 19.06.2021 22:35
by ertank
Should be no problem with file encoding. It is slow but I can work with it on Notepad++
Attached is a video that I could keep as small as possible.