Syntax higlighting in long XML documents


I have to work with long XML files (TEI encoded documents) and syntax highlighting does not work in these documents.

  • According to this comment this is actually expected behaviour for files larger than 2MB.
  • BUT syntax highlighting in the minimap preview does work, and - more surprisingly - fiddling around with spltting panes actually does make syntax highlighting work (also see this comment)

So my question is if this is supposed to work after all and I am just doing something wrong??


My understanding matches @leedohm’s and I trust his expertise. I can’t explain that screenshot. Perhaps something happened in the right pane that caused Atom to decide to highlight it. Notice that the left pane is still a pending item.

Can you reproduce that screenshot using your own setup?


Yes I can reproduce with:

  • open large XML file, no syntax highlighting
  • View > Panes > Split Right
  • XML file in right pane with working syntax highlighting


Apparently Atom decided differently about whether it would highlight the split pane. I can’t tell you why that’s happening because I don’t know anything about the internals of how Atom makes this decision.


FYI, Atom is aiming to release a new internal grammar engine, which is capable of parsing files of any size. They expect it to land sometime this year (according to the blog).