text: viewtopic.php?f=2&t=7621&start=0
  You always have to parse an entire file. You can never just insert something into a file on disk, you have to rewrite the file with the node inserted in. The code I provided takes the text content of the XML and creates an XML object that you can use to insert a node. When you are done inserting nodes you can extract the content from the object. The XML object has methods for inserting new nodes etc. I don't really have time right now to go through the XML methods but here is showing how you can create a node w3schools.com/dom/dom_nodes_create.asp, but it is pretty well documented online.
  @facelessuser. Thank you.
  That's the detail I was looking for . Thanks for the link (.. although, I don't really need it )
  An interesting, or debatable, read - depending on your point of view: w3fools
  Interesting link. Though I only provided a link to them because it was one of the first to show up in google . Wasn't exactly sure what you were asking, so I was trying to cover all the bases.
  @facelessuser
  I still refer to w3schools because it always appears earliest from a Google search, and it's a familiar site to navigate. But I also try to dig a little deeper as well - I have myself occasionally noticed incomplete or out-of-date information on that site.
  Regards, Andy.
  Sorry if I'm being OT.
  As far as I can tell the biggest difficulty with editing sublime colour schemes has to do with finding out how to write it out so that it cascades properly for the various language (rather than defining everything with very specific scopes) and that as the file grows, fiddling with hex values becomes rather infuriating*.
  This issue would not be greately helped by a UI. On the other hand, it would be great if one were able to define and reuse values and, closely related to this, the ability to define colors programatically. For example, in LESS one might write something like:
  @blue-color: #0066cc;
  some.div {
  background:@blue-color;
  border:1px solid darken(@blue-color, 10);
  }
  @other-color: desaturate(spin(@blue-color, 30), 10);
  Now that I'm thinking about it, it would also be nice to be able to nest scopes:
  string {
  foreground: @orange;
  punctuation {
  foreground: lighten(@orange, 15);
  }
  }
  {
  "name": "Green",
  "scope": "entity.name.class, entity.other.inherited-class, entity.name.function, entity.other.attribute-name, markup.inserted",
  "settings": {
  "foreground": "#A6E22E"
  }
  }
  Doesn't a theme file already, effectively, use a cascade? If you colour "entity.other" and also colour "entity.other.class" then this creates a cascade?!
  github.com/facelessuser/ScopeHunter
  There also other, less fancy plugins around the forums.
  "ctrl-alt-shift-p" works well for most cases. If the covered scope is too long (and exceeds the statusbar) or you want to copy it/use multiple cursors:
  import sublime_plugin
  class PrintScopeCommand(sublime_plugin.TextCommand):
  def run(self, edit):
  for sel in self.view.sel():
  if sel.empty():
  row, col = self.view.rowcol(sel.a)
  print("line %d, col %d: %s" % (row + 1, col + 1, self.view.scope_name(sel.a)))