Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Syntax highlighting in nano on Mac OS
# Last updated March, 2022 for Apple silicon Macs
# Install Homebrew if you don't already have it:
# install nano from homebrew
brew install nano
# update your nanorc file
echo 'include "/opt/homebrew/Cellar/nano/*/share/nano/*.nanorc"' >> ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
Copy link

leaf-ts commented Jul 7, 2022

for me what worked is

echo "include /opt/homebrew/Cellar/nano/6.3/share/nano/*.nanorc" >> ~/.nanorc

Copy link

up9cloud commented Sep 18, 2022

brew install nano
echo include "$(brew --prefix nano)/share/nano/*.nanorc" >> ~/.nanorc


brew install nano
brew install nanorc
echo include "$(brew --prefix nanorc)/share/nanorc/*.nanorc" >> ~/.nanorc

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