+1

XML Syntax Highlighting: Colored Nested Tags

Manju Sreedaran 5 years ago • updated by Shannon Posniewski 5 years ago 2



XML files could use colored nested tags as pictured (or a little smarter based on tag name). I know this would clash with color themes and such, and this is already a "sublime" editor anyway (since the minimap saves me much trouble in exactly the situations I wish for this). Colored tags, highlighted scope (fully colored lines instead of underlined tags) or something else to the effect of telling where I am and where that "where" starts and ends in some large XML file is my wish.


This would be analogous to LISP editors that color nested parens with different colors to easily distinguish the depth of some block you're viewing.

Yes, I do know about the collapsing, and yes, there is very probably some plugin for correcting XML indentation. Here are a few notes about this idea:


Malformed XML might break an implementation of this in hideous ways. Also, there could be some hard limit on the number of colors so that there isn't a whole lot of time being spent generating the colors if some (valid but poorly thought-out) XML file has a large number of levels of nesting. I do understand that Sublime Text is a text editor first an foremost and not an IDE or an XML viewer so a plugin for this (maybe with adjustable configurations on how many levels of nesting to consider) may be a better idea if implementing this feature request.