nano-devel
[Top][All Lists]
Advanced

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

Re: RFC: pruning some syntaxes


From: Brand Huntsman
Subject: Re: RFC: pruning some syntaxes
Date: Wed, 8 Apr 2020 06:42:04 -0600
User-agent: -

On 12:07 Wed  8-Apr-2020, Benno Schulenberg wrote:
> So, I propose to add a subdirectory "extra/" to the syntax directory,
> and move some of the syntaxes there.

The default nanorc should include a commented line to add all extra
syntaxes.


> rename mutt.nanorc to email.nanorc (and rename the syntax to "email" too,
> and add some rules for coloring "From:" and "Date" and "Subject:" lines).

I renamed mutt.nanorc to email.nanorc, because I have an actual
mutt.nanorc to colorize all of the mutt config files.

email.nanorc is used to edit existing emails that do contain headers,
but mostly used to compose new emails which don't. Trying to color
headers would lead to incorrect coloring when composing an email with a
line that begins with a header name followed by a colon. I only color
end of line whitespace, email addresses, urls and three levels of
quotes.

color #F0F:magenta "^>.*"
color #C0C:magenta "^> ?>.*"
color #70C:magenta "^> ?> ?>.*"
color blue "[-.+_a-zA-Z0-9]+@[-.a-zA-Z0-9]+"
color #807FFF:brightblue "(https?|ftp)://[-.,/%~_:?&=#a-zA-Z0-9]+"
color black,blue "[[:space:]]+$"


> Who uses Markdown and can contribute a syntax for it?

I use the one at:
https://ourcodeworld.com/articles/read/807/how-to-enable-syntax-highlighting-for-markdown-files-in-gnu-nano





reply via email to

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