Here is a .nanorc File For OS X iTerm2 .zshrc For Better Readability of the Key Phrases and Comments For Who Use Nano for Editing .zshrc. OS X nano requires some manual work for making it working for syntax highlighting. Also, we have an useful guide on iTerm2-OSX-Homebrew setup for the new OS X users. We have an extensive nanorc file collection which can found on GitHub as Repo here.
.nanorc File For OS X iTerm2 .zshrc : Manual Method
The nanorc file is available here on the same repository for including on an existing setup. The snippet is here :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
########################################################################## # Written By Dr. Abhishek Ghosh under GNU GPL 3.0 # # HSTS website : https://thecustomizewindows.com # # Email : me@abhishekghosh.pro # ########################################################################## syntax "zsh" "\.zshrc" color brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$" color brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backu$ color blue "^[[:space:]]*(set|unset)[[:space:]]+(http|HTTP|if|fi|quickblank|quo$ color green "^[[:space:]]*(set|unset|include|syntax|import|export)\>" color yellow "^[[:space:]]*(ZSH|ZSH_THEME|source)\>" color red "^[[:space:]]*(GO|ruby|RUBY|Ruby|DISABLE_AUTO_UPDATE)\>" color blue ""(\\.|[^"])*"" color brightblue "^[[:space:]]*(plugins)\>" color cyan "^[[:space:]]*#.*##" color yellow start="<!--" end="-->" color red "&[^;]*;" "^[[:space:]]*GO\>" icolor brightred "\$\{?[0-9A-Z_!@#$*~.?-]+\}?" color brightcyan "(python|RVM)" |
You can cd to /usr/local/share/nano/
and create a .nanorc
file to include it in ~/.nanorc
and then source it :
---
1 2 3 |
cd /usr/local/share/nano/ nano zsh.nanorc # paste the snippet |
then cd to home location and do the steps :
1 2 3 4 5 |
cd ~ && nano ~/.nanorc # add # include "/usr/local/share/nano/zsh.nanorc" # then save and run source .nanorc |
.nanorc File For OS X iTerm2 .zshrc : Using Our Full Library
As we have said before, we have an extensive collection of all the syntax highlighting nanorc files. It includes a make file to concatenate all the files to one file :
1 2 3 |
cd ~ && git clone https://github.com/AbhishekGhosh/nano-syntax-highlighting-iNano-.git cd nano-syntax* && sudo make install-global TEXT=white nano ~/.nanorc |
then include the file in ~/.nanorc
:
1 |
include "/usr/local/share/nano/ALL.nanorc" |

.nanorc File For OS X iTerm2 .zshrc : Features
source
andexport
will get different colors.DISABLE
is colored as red.ZSH_THEMES
is yellow whileplugins
is blue.$PATH
,$HOME
will take red color.- Commented out kept back as white, compare a commented out line like
#ZSH_THEME="prose"
with non-commented out line ZSH_THEME=”random”
Needless to say that .nanorc File For OS X iTerm2 .zshrc have a Free Software License, you can modify for your need.
Here’s what we’ve got for you which might like :
Additionally, performing a search on this website can help you. Also, we have YouTube Videos.
Take The Conversation Further ...
We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!
If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.
Contact Us