XML file opens as txt file

XML file opens as txt file and, after setting file type to XML (colors and format as expected), does not persist across sessions.

Komodo IDE, version 10.0.0, build 89159, platform win32-x86.

Are they have .xml file format?

Can you elaborate on what this means? Closing and opening a file in the same Komodo session?

  • Carey

Yes, the file is xml compliant. I select file fomat xml and everything is OK (color & formatting) and an application uses the file as xml. I edit/save the file, close the file (or exit Komodo), reopen the file and it opens as .txt

Please try Help > Troubleshooting > Reset File Preferences and try opening the file again. It’s possible that file is “stuck” on txt for some reason.

Help > Troubleshooting > Reset File Preferences did not help.

However, right-clicking/open with the file in Windows explorer launched an instance of Komodo that threw this notification:
CodeIntelError: File too big. Size: 2637452 bytes, path: u’z:\dev_8282\upload_format.xml’
Mon Jun 06 2016 10:51:10 GMT-0700 (Pacific Standard Time)

What is the file limit?

Oh, I know what the problem is. When a large file is detected, Komodo will not apply syntax highlighting, since that might cause a big slowdown. That’s why you’re getting plain text by default, and why you need to manually specify XML. As for what the threshold for that is, I’m not sure. 1-2MB I think.

For code intelligence, the limit is 1MB, but that will not affect XML autodetection.

Is it possible for a user to manage the file size limit for xml detection?

No, I do not believe this is possible. Komodo wasn’t designed for editing such large files (it can, but it’s not optimized to do so).