Multi Commander > User Contributed Content

MultiDataViewer - BAT Color syntax formatting

(1/1)

pncdaspropagandas:
I made rules for formatting bat 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="BAT" id="b89ce93014ba4389a6e1a76981a0984f" ext="bat">
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="2">rem</format>
    <format themecolor="0" textcolor="#0080ff" backgroundcolor="-1" flags="256">^\w+</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">^\s*\t*\b(?:[Aa][Ss][Ss][Oo][Cc]|[Bb][Rr][Ee][Aa][Kk]|[Cc][Aa][Ll][Ll]|[Cc][Hh][Cc][Pp]|[Cc][Hh][Dd][Ii][Rr]|[Cc][Dd]|[Cc][Ll][Ss]|[Cc][Oo][Ll][Oo][Rr]|[Cc][Oo][Pp][Yy]|[Dd][Aa][Ee]|[Ee][Cc][Hh][Oo]|[Ee][Nn][Dd][Ll][Oo][Cc][Aa][Ll]|[Ee][Xx][Ii]|[Ff][Oo][Rr]|[Ff][Yy][Pp][Ee]|[Gg][Oo][Oo]|[Ii][Ff]|[Mm][Kk][Dd][Ii][Rr]|[Mm][Oo][Vv][Ee]|[Pp][Aa][Hh]|[Pp][Aa][Uu][Ss][Ee]|[Pp][Oo][Pp][Dd]|[Pp][Rr][Oo][Mm][Pp]|[Pp][Uu][Ss][Hh][Dd]|[Rr][Ee][Nn][Aa][Mm][Ee]|[Rr][Mm][Dd][Ii][Rr][  ][Rr][Dd]|[Rr][Ee][Nn]|[Ss][Ee]|[Ss][Ee][Ll][Oo][Cc][Aa][Ll]|[Ss][Hh][Ii][Ff]|[Ss][Aa][Rr]|[Ii][Mm][Ee]|[Ii][Ll][Ee]|[Yy][Pp][Ee]|[Vv][Ee][Rr]|[Vv][Ee][Rr][Ii][Ff][Yy]|[Vv][Oo][Ll])\b</format>
    <format themecolor="0" textcolor="#0000ff" backgroundcolor="-1" flags="256">\b(?:[Gg][Oo][Oo]|[Ii][Ff]|[Ff][Oo][Rr]|[Dd][Oo]|[Ii][Nn]|[Ss][Ee])\b</format>
    <format themecolor="0" textcolor="#ff8040" backgroundcolor="#ffffd9" flags="256">%%\w+</format>
    <format themecolor="0" textcolor="#ff8040" backgroundcolor="#ffffd9" flags="256">%~?(\w+)</format>
    <format themecolor="0" textcolor="#ff8040" backgroundcolor="#ffffd9" flags="1">$%</format>
    <format themecolor="0" textcolor="#ff8000" backgroundcolor="#ffffd9" flags="256">!(?:[^"%\\]|\\.)*?!</format>
    <format themecolor="0" textcolor="#808080" backgroundcolor="-1" flags="256">"(?:[^"%\\]|\\.)*?"</format>
    <format themecolor="0" textcolor="#808080" backgroundcolor="-1" flags="1">"</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="16640">^\s*\t*:</format>
    <format themecolor="0" textcolor="#ff0080" backgroundcolor="-1" flags="4352">^@</format>
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="4352">^::</format>
    <format themecolor="0" textcolor="#008000" backgroundcolor="-1" flags="4352">\b(?:[Rr][Ee][Mm])\b</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="1">|,*,&lt;,&gt;,=</format>
    <format themecolor="0" textcolor="#0080ff" backgroundcolor="-1" flags="1">(,)</format>
    <format themecolor="0" textcolor="#ff0000" backgroundcolor="-1" flags="256">\b[0-9]+</format>
  </profile>

Mathias (Author):

--- Quote from: pncdaspropagandas on September 04, 2017, 14:38:06 ---Add the following to you "mcinstallpath\Extensions\MultiFileViewer\ColorFormatting.xml" file. Backup first if you like.

--- End quote ---

That is the default file,  If you already tweak the colors before, then will have personal file in
<yourconfig>\MultiCommander\Config\Extensions\MultiFileViewer\ColorFormatting.xml

(type :goconfig in the commandline field to the personal config folder)

Mathias (Author):
If you allow.  I can add all three (Bat,Sh,Html) profiles to the default profile for the next version

pncdaspropagandas:
Sure Mathias. That would be great.

Navigation

[0] Message Index

Go to full version