From 2715a33de3d242c58e90a8eb861b9a2bd7b5414b Mon Sep 17 00:00:00 2001 From: Mashrafi Rahman <95113443+marshlands2048@users.noreply.github.com> Date: Sun, 22 May 2022 00:10:32 +0800 Subject: [PATCH] Added option to install using Homebrew See more at [Homebrew](https://formulae.brew.sh/formula/nanorc#default). --- readme.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 30e8db0..e087337 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ This repository holds ``{lang}.nanorc`` files that have improved definitions of ## Installation -There are three ways to install this repo. +There are four ways to install this repo. ### 1. Automatic installer @@ -64,13 +64,19 @@ For system wide, run: sudo git clone https://github.com/scopatz/nanorc.git $install_path ``` +### 4. Homebrew + +``` +brew install nanorc +``` + ## Configuration After installation, you need to inform `nano` to used the new highlight files. The configuration file is located at `~/.nanorc`, for users, and at `/etc/nanorc`, for system wide. If this file doesn't exist, create a new one. -Again there are three ways: +There are three ways: ### 1. Include all @@ -86,6 +92,18 @@ or echo "include $install_path/*.nanorc" >> /etc/nanorc ``` +If you used `Homebrew` to install `nanorc`, replace `$install_path` with `~/.nano/`: + +``` +echo "include ~/.nano/*.nanorc" >> ~/.nanorc +``` + +or + +``` +echo "include ~/.nano/*.nanorc" >> /etc/nanorc +``` + ### 2. Include/append our `nanorc` file Simply run: @@ -113,7 +131,7 @@ include "~/.nano/c.nanorc" ### macOS -`\<` and `\>` are regular character escapes on MacOS. +`\<` and `\>` are regular character escapes on macOS. The bug is fixed in Nano, but this might be a problem if you are using an older version If this is the case, replace them respectively with `[[:<:]]` and `[[:>:]]`. This is reported in [Issue 52](https://github.com/scopatz/nanorc/issues/52).