Author Topic: MultiDataViewer - SH Color syntax formatting  (Read 33627 times)

pncdaspropagandas

  • Contributor
  • Active Member
  • *****
  • Posts: 93
    • View Profile
MultiDataViewer - SH Color syntax formatting
« on: September 04, 2017, 14:38:48 »
I made rules for formatting linux sh files in MultiDataViewer.

It's not perfect, but it's fine. Maybe someone could improve it.

Add the following to you "mcinstallpath\Extensions\MultiFileViewer\ColorFormatting.xml" file. Backup first if you like.

  <profile name="SH" id="334b5e34f49246d8af418b2db717562b" ext="sh">
    <format themecolor="0" textcolor="#008080" backgroundcolor="#00ffff" flags="256">\$\{([^\s]+)</format>
    <format themecolor="0" textcolor="#808080" backgroundcolor="-1" flags="256">"\$(\w+)</format>
    <format themecolor="0" textcolor="#ff8040" backgroundcolor="#ffffd9" flags="256">\$(\w+)</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">\b(?:[Cc][Aa][Ss][Ee]|[Dd][Oo]|[Dd][Oo][Nn][Ee]|[Ee][Ll][Ii][Ff]|[Ee][Ll][Ss][Ee]|[Ee][Ss][Aa][Cc]|[Ff][Ii]|[Ff][Oo][Rr]|[Ff][Uu][Nn][Cc][Ii][Oo][Nn]|[Ii][Ff]|[Ii][Nn]|[Ss][Ee][Ll][Ee][Cc]|[Hh][Ee][Nn]|[Uu][Nn][Ii][Ll]|[Ww][Hh][Ii][Ll][Ee]|[Ii][Mm][Ee])\b</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">\b(?:[Cc][Dd]|[Ee][Cc][Hh][Oo])\b</format>
    <format themecolor="0" textcolor="#804040" backgroundcolor="#e1fff3" flags="256">`(?:[^"\\]|\\.)*?`</format>
    <format themecolor="0" textcolor="#808080" backgroundcolor="-1" flags="256">"(?:[^"\\]|\\.)*?"</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="256">\b[0-9]+</format>
    <format themecolor="0" textcolor="#804000" backgroundcolor="-1" flags="256">(?:\[|\(|\]|\)|=|\||;|!|\/|-|&lt;|&gt;)</format>
    <format themecolor="0" textcolor="#804000" backgroundcolor="-1" flags="2">{,},{}</format>
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="4352">^#</format>
  </profile>