I'm trying to set a 'default' syntax highlighting scheme for nano when I'm editing files with no extension such as /etc/nginx/sites-available/default
or /etc/ssh/sshd_config
but I can't seem to make it work.
I've copied the c
syntax highlighting file into /usr/share/nano/default.nanorc
and then added include "/usr/share/nano/deafult.nanorc"
to my ~/.nanorc
file but I'm still not getting highlighting for files with no extension.
Anyone know how to enable this?
Best Answer
You can define this by yourself. Here is a good example from Arch Linux Forums.
Copy the following code and save it in /usr/share/nano/ as conf.nanorc
Then include this configuration in /etc/nanorc file as
Source: nano syntax highlighting: catch-all syntax for configuration files.