title: How to syntax highlight different assembly languages in Gedit?
body: <p>By default, text editors using GtkSourceView (such as Gedit and Mousepad) don't highlight <code>.asm</code> files. The <a href="https://stackoverflow.com/a/17003402/2738262">solution by Drew Noakes</a> is to download a GtkSourceView language definition file for x86 assembly language into <code>.local/share/gtksourceview-3.0/language-specs/</code>. I know how to make a language definition file per <a href="https://developer.gnome.org/gtksourceview/stable/" rel="noreferrer">GNOME.org's GtkSourceView documentation</a>.</p>
  
  <p>However, I routinely work with multiple instruction sets, each of which needs different highlighting rules:</p>
  
  <ul>
  <li>MOS 6502 assembly (for NES, Commodore 64, Apple II, Atari 8-bit, etc.)</li>
  <li>Sharp SM83 assembly (for Game Boy)</li>
  <li>Zilog Z80 assembly (for MSX, ZX Spectrum, Game Gear, etc.)</li>
  <li>ARM assembly (for Game Boy Advance, etc.)</li>
  </ul>
  
  <p>All of them may use <code>.s</code> or <code>.asm</code> as a file name suffix, so the <code>&lt;metadata&gt;&lt;property name="globs"&gt;*.s&lt;/property&gt;&lt;/metadata&gt;</code> appears inadequate to distinguish them.</p>
  
  <p>Is there a good way to indicate the instruction set of an assembly language file to a GtkSourceView editor? In particular, is there a better way than locally defining an Internet media type for each ISA using <a href="https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/" rel="noreferrer">shared-mime-info</a>, using <code>&lt;magic&gt;</code>, and ensuring that all collaborators also have the same locally defined Internet media type?</p>