Here are some steps to help you out (for Mac users)
- Create a new directory in /usr/local/share/ called 'nano' like this:
mkdir /usr/local/share/nano
- Now, using nano, make a nano resource file for your C syntax like this:
nano /usr/local/share/nano/javascript.nanorc
- Now put your javascript.nanorc code highlighting in this file and save it.
- Save that file and now open your user’s nano resource file by typing:
nano ~/.nanorc
- In this file, add a reference to the c.nanorc file you just made like this:
include "/usr/local/share/nano/c.nanorc"
- Save your user resource file.
- You done!