nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Syntax Highlighting


From: Mike Frysinger
Subject: Re: [Nano-devel] Syntax Highlighting
Date: Thu, 12 Nov 2015 22:04:01 -0500

you might want to add to both a catch all like:
# Trailing whitespace.
color ,green "[[:space:]]+$"

we do that for many source formats

> ## Here is an example for Batch scripts.
> ## CREATED BY MITCH BUMGARNER ON MAY 10TH 2014

we don't normally put this in these files.  your contribution can be listed
in the commit message or in the ChangeLog file.

> syntax "bat" "\.(bat|cmd)$"

i would say "batch" instead of "bat"

> ## PARAMETERS IN A BATCH FILE THAT ARE %X IN COMMAND LINE

no need for caps in comments

also, would be nice to put a blank line between major unrelated sections.
in these files, probably before each ## block.

> ## MAJOR STATEMENTS
> icolor red "(do|else|exist|exit|for|goto|if|not|return|say|select|then|when)"

pretty sure you want to use \< and \> to delimit words.  otherwise you'll
color substrings in unrelated words like:
        fodobar
the "do" would be made red.

so something like:
icolor red "\<(do|else|......)\>"

> icolor brightmagenta "([[:space:]]equ|neq|gtr|lss|geq|leq[[:space:]])"

pretty sure you want the space outside of the paren.  actually, you probably
want to delete them and use the \< and \> idea from earlier.  this comes up
multiple times in these files.

> syntax "ps1" "\.(ps1|psm1)$"

you probably want "powershell" instead of "ps1"

> icolor brightred "address@hidden"

use [:alnum:] instead of 0-9A-Z
-mike

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]