Re: Select syntax colouring from within Nano?

Seb <[email protected]> Sat, 1 Aug 2020 14:55:03 +0200 (CEST)
Newsgroups gmane.editors.nano.general
Message-ID <[email protected]>
Hi Benno,


> When nano does not apply the correct syntax to a file, one could do either:
> 2) add or modify the first line so that nano recognizes it,

I am quite interested by this: most often, my Perl scripts do not have a 
name that ends in .pl so the following lines in my ~/.nanorc do not apply:
 	syntax perl "\.(html|mas|pl)$"
 	comment "#"
 	color brightblack "#.*"

Could you give an example of how I could tell Nano that files starting 
with #!/usr/bin/perl are to use some syntax-hilighting scheme? A pointer 
to the relevant part of the Doc would be just as good :-)


Kind regards,
Sébastien.