Skip to content

Instantly share code, notes, and snippets.

@BlakeGardner
Last active April 22, 2025 16:42
Show Gist options
  • Save BlakeGardner/5587269 to your computer and use it in GitHub Desktop.
Save BlakeGardner/5587269 to your computer and use it in GitHub Desktop.
Syntax highlighting in nano on Mac OS
# Last updated May, 2024 for Apple silicon Macs
# Install Homebrew if you don't already have it: https://brew.sh
# install nano from homebrew
brew install nano nanorc
# update your nanorc file
echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
@BlakeGardner
Copy link
Author

Updated the gist thanks @tobsn

@hsiktas
Copy link

hsiktas commented Apr 19, 2025

It took me way too long to notice that the /usr/bin/nano that comes with macOS is actually "UW PICO 5.09". GNU nano installed via homebrew immediately followed that .nanorc and applied syntax highlighting. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment