Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7731669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:32:24+00:00 2026-06-01T06:32:24+00:00

How to enable syntax highlighting for nano in Mac OS X 10.7 (Lion)? According

  • 0

How to enable syntax highlighting for nano in Mac OS X 10.7 (Lion)?

According to what I found so far on Google is that it has got to do with /.nanorc file. I have no idea how to get it or make it?

When I try to find nano in my terminal this is what I get:

Notra:~ Sukhvir$ whereis nano
/usr/bin/nano

According to what I found on Internet this is the file I need to edit:

~/.nanorc

But how do I get to it/how to open it/if I don’t have it then how to make it?

I am a bit new to programming folks, so step-by-step instructions will be highly appreciated.

I need it for C mainly.

According to what I found online, I have to paste this into the .nanorc file:

include "/usr/share/nano/nanorc.nanorc"
include "/usr/share/nano/c.nanorc"

However this will not work because there is no such directory as /usr/share/nano.

I also just did ls /usr/share/ and according to the results there is no nano in that directory. Is this a Mac OS X 10.7 (Lion) issue or an issue on my Mac?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:32:26+00:00Added an answer on June 1, 2026 at 6:32 am

    Here are some steps to help you out.

    1. Create a new directory in /usr/local/share/ called ‘nano’ like this:

    mkdir /usr/local/share/nano

    1. Now, using nano, make a nano resource file for your C syntax like this:

    nano /usr/local/share/nano/c.nanorc`

    1. Now put your C code highlighting in this file and save it. Here is a link to some possible C syntax highlighting:

    http://code.google.com/p/nanosyntax/source/browse/trunk/syntax-nanorc/c.nanorc

    1. Save that file and now open your user’s nano resource file by typing:

    nano ~/.nanorc

    1. In this file, add a reference to the c.nanorc file you just made like this:

    include “/usr/local/share/nano/c.nanorc”

    1. Save your user resource file.

    Now, when you open up C files, you should see syntax highlighting. You can add additional syntax highlighting for different types of files using the same method. Just add more lines to your ~/.nanorc file.

    Note that depending on your user permissions, you may have to precede some of the above commands with sudo and then enter your root password.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can enable syntax highlighting for a file that has an extension that is
Under 'Syntax highlighting' there is an option for 'enable semantic highlighting'. What does that
I have an ASP.NET MVC website which has a particular javascript file that needs
I just realized, that netbeans does not support syntax highlighting for markdown files. Is
Delphi has a $WARN compiler directive that allows one to selectively enable or disable
I got answer from the SDL Tridion forum that we can enable inline editing
I've got a canvas that works thanks to Google's excanvas in IE. Now I
Direct Question : Is it possible to enable syntax highlighting for CUDA 4.0 in
Is there any way to tell Visual Studio 2010 to enable syntax highlighting for
By enable the option called Application supports iTunes file sharing , I can integrate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.