[Top][All Lists]

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

Re: [Help-nano] Bash syntax highlighting: Quoted text in comments

From: Benno Schulenberg
Subject: Re: [Help-nano] Bash syntax highlighting: Quoted text in comments
Date: Sat, 24 Feb 2018 11:19:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Op 23-02-18 om 21:39 schreef Michael Siegel:
> Well, the order of the regexes for coloring comments and quoted strings
> in sh.nanorc is the same across both versions on my systems (And I'm
> pretty sure I've never touched that file.). So, as long as you don't
> swap that around, there's no difference between 2.2.6 and 2.7.4 in
> highlighting your example.

Ah.  Yes, you're right.  I looked in history and saw this diff:

and thought the order had changed.  But if I had looked a bit further:

the order had changed shortly before.  Resulting in no change.  :|

>>> So, are there any chances that nano will gain the ability to fully parse
>>> scripts for highlighting in the near future?
>> No, no chance.  Nano is a small editor, fully parsing all the files
>> for which it provides syntax coloring is not within its scope.
> I see. But then, the code parsing wouldn't necessarily have to be
> handled by nano itself, would it? I mean, wouldn't it be possible to
> equip nano with the ability to make use of an external parser?

In theory, yes.  But in practice...  The coloring code is so interwoven
with nano's display code, that wanting to use an external parser would
mean a major overhaul, no, a total overhaul of the display routines.

I'm not interested in working on that.  (And even if someone would
provide a patch set, it would mean an extra dependency...  Currently
it's just ncurses.  It's nice to need just one thing.)


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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