nonethefewer: A heart made out of a motherboard. (geek heart)
[personal profile] nonethefewer
nano doesn't come with highlighting on macOS, unless I'm dramatically missing something. So, notes for myself for later:

Source links:

* https://stackoverflow.com/questions/9642617/nano-syntax-highlighting-in-mac-os-x-10-7-lion
* https://github.com/scopatz/nanorc

Steps:
  1. Download a .zip file of the repo here.

  2. Extract all files from the .zip file.

  3. In Terminal, run: mkdir /usr/local/share/nano

  4. In Terminal, run: mv ~/Downloads/nanorc-master/*.nanorc /usr/local/share/nano/

  5. In Terminal, run: nano ~/.nanorc

  6. Add a line like this, for whichever language you want:
    include "/usr/local/share/nano/python.nanorc"

  7. Save your file.

  8. Quit out of Terminal and reopen to use the shininess.

Note: Apparently nano for the Mac doesn't recognize the header keyword on line 4 of the .nanorc files. You'll have to comment that out with a #. (For more nerdy shit on that, go here.)
This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

February 2022

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728     

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 29th, 2025 04:11 pm
Powered by Dreamwidth Studios