From 94f8d695c144366e431d18b7ed89f830c3da6e10 Mon Sep 17 00:00:00 2001 From: Dante Falzone <48266179+DanteFalzone0@users.noreply.github.com> Date: Wed, 5 Aug 2020 13:56:49 -0500 Subject: [PATCH 1/2] Added support for Batch (CMD.EXE) --- batch.nanorc | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 batch.nanorc diff --git a/batch.nanorc b/batch.nanorc new file mode 100644 index 0000000..4036de7 --- /dev/null +++ b/batch.nanorc @@ -0,0 +1,39 @@ +## Nano syntax highlighting file for Batch +## Written by Dante Falzone https://github.com/DanteFalzone0 + +syntax "Batch" "\.[bBcC][aAmM][tTdD]$" +comment "REM" + +## Commands for basic I/O +icolor green "\<(cls|echo|pause|choice|more|type)\>" + +## Commands for file operations +icolor green "\<(assoc|cd|copy|del|move|path|rd|ren|vol|attrib|chkdsk|comp|convert)\>" +icolor green "\<(expand|format|label|subst|xcopy|robocopy|fc|diskpart|md|mkdir)\>" + +## Other commands +icolor cyan "\<(ver|dir|date|exit|prompt|start|time|cmd|driverquery|find|help|ipconfig)\>" +icolor cyan "\<(net|ping|shutdown|sort|systeminfo|taskkill|tasklist|tree|title|set)\>" + +## Operators +icolor yellow "[.:;,+*-/|=!<>&%@\"]" + +## Executable files +icolor brightred "[[:graph:]]+\.exe[[:space:]]" +icolor brightred "[[:graph:]]+\.exe$" + +## Switches and labels +icolor brightmagenta "/[[:graph:]]+$" +icolor brightmagenta "/[[:graph:]]+[[:space:]]" + +## Numerals +icolor brightyellow "[[:digit:]]" + +## Block delimeters +icolor magenta "[(){}]" + +## Comments +icolor brightblue "REM.*" + +## Trailing whitespace +color ,green "[[:space:]]+$" From ee9ce560032f3a42d33788f76e7a784a0fd91f1f Mon Sep 17 00:00:00 2001 From: Dante Falzone <48266179+DanteFalzone0@users.noreply.github.com> Date: Wed, 5 Aug 2020 13:57:56 -0500 Subject: [PATCH 2/2] fixed file extension matching for batch.nanorc --- batch.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/batch.nanorc b/batch.nanorc index 4036de7..0001dd1 100644 --- a/batch.nanorc +++ b/batch.nanorc @@ -1,7 +1,7 @@ ## Nano syntax highlighting file for Batch ## Written by Dante Falzone https://github.com/DanteFalzone0 -syntax "Batch" "\.[bBcC][aAmM][tTdD]$" +syntax "Batch" "\.[bB][aA][tT]$" "\.[cC][mM][dD]$" comment "REM" ## Commands for basic I/O