Re: Bash syntax highlighting: Quoted text in comments
Benno Schulenberg <[email protected]>
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
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:
http://git.savannah.gnu.org/cgit/nano.git/commit/?id=5d5e930a
and thought the order had changed. But if I had looked a bit further:
http://git.savannah.gnu.org/cgit/nano.git/commit/?id=1dd389e4
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.)
Benno
_______________________________________________
Help-nano mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-nano
signature.asc
(application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJakTwiAAoJEA0o1NKgrOiEcMEP/i2ybAo3Yt+3GUwEl+mdAzCI 2/oC2WP+/vPEhXymt8BmJ05ECuNGOEJghnUqOAOq80vww2OozQDEtf8AWz1cFevz Pb+Ry3sZ9E4t5IixKlYHMcX0JPpI4xhkxcqwMdexdISObxqiy6XhwF2yixwPZUR1 qim5VSkz6z085SQ1P+NJN/gHqJMNvKKUrjKWO8hf8acYDdIIvB+ncn6zQGP/Loq5 qW1/HAEfuvzET8UAe74qGJ+8zvuchW1ZeJxLRZfYw/b71/0NLAtZv2BfnglMDCrR re79ud5cH7OGgiisWZMa4S9rl0a5rJOeOckXjQTFfLPMjsxiR5g+ecwQUOy4T5Ep 4+4B3U+uGkBU7Th0w3Wy4ziJi6zBN3z4MxAegRkciZ52vYBw40zqUSJhlwMRj++V /w0ryDa557DAnrCI2POwaLjiJx7egBjGGZM23pt0R4URKzM4qSmwBuBUeCilCJod 0UUy/yWQ5Q7vY38msUDS+z+4N2c2w1nYN8coaGedfNHcdg9HlkxBhgYRK3XYyvUZ H9eDteNvOc8BWnXRDY0LMnAX6bq5quE4fME8My1wKwqYTKtOTLGOZCmtABbwry2g 1dbN8nU4IzyeF9yKwYi6HPDNVhMsCvGJMEiiFRWyeLHl/SVvYixZmbMXeXVzm7SF rCaYvJn2rS088rqbEu0q =jWW2 -----END PGP SIGNATURE-----