From 1718e6b414b4ad0823d541eadb68b465ee23bde6 Mon Sep 17 00:00:00 2001 From: semitrivial Date: Thu, 28 May 2015 23:09:03 +0100 Subject: [PATCH] Add comments for Mac OSX users --- c.nanorc | 5 +++++ java.nanorc | 5 +++++ js.nanorc | 15 +++++---------- json.nanorc | 5 +++++ 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/c.nanorc b/c.nanorc index ea08fb3..4510b2d 100644 --- a/c.nanorc +++ b/c.nanorc @@ -1,5 +1,10 @@ ## Here is an example for C/C++. ## + +## Mac OSX users: If you use Mac OSX, it might be necessary to perform the following: +## 1. Replace \< by [[:<:]] +## 2. Replace \> by [[:>:]] + syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" color brightred "\<[A-Z_][0-9A-Z_]+\>" color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" diff --git a/java.nanorc b/java.nanorc index a432f81..ca50be9 100644 --- a/java.nanorc +++ b/java.nanorc @@ -1,5 +1,10 @@ ## Here is an example for Java. ## + +## Mac OSX users: If you use Mac OSX, it might be necessary to perform the following: +## 1. Replace \< by [[:<:]] +## 2. Replace \> by [[:>:]] + syntax "java" "\.java$" color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" diff --git a/js.nanorc b/js.nanorc index 79a4af0..16979b7 100644 --- a/js.nanorc +++ b/js.nanorc @@ -1,17 +1,12 @@ ### all *js files ( e.g. Firefox user.js, prefs.js ) -## Old version - -#syntax "jsfiles" "(\.|/|)js$" -#color green "//.*$" start="\/\*" end="\*\/" -#color blue "'(\\.|[^'])*'" -#color red ""(\\.|[^\"])*"" -#color brightgreen "\<(true)\>" -#color brightred "\<(false)\>" "http\:\/\/.*$" -#color brightmagenta "[0-9](\\.|[^\"])*)" - ## New updated taken from http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting +## Mac OSX users: If you use Mac OSX, it might be necessary to perform the following: +## 1. Replace \< by [[:<:]] +## 2. Replace \> by [[:>:]] +## 3. Replace \' by \\' + syntax "JavaScript" "\.(js)$" ## Default diff --git a/json.nanorc b/json.nanorc index 1740a4c..fbff6b9 100644 --- a/json.nanorc +++ b/json.nanorc @@ -1,6 +1,11 @@ syntax "json" "\.json$" header "^\{$" +## Mac OSX users: If you use Mac OSX, it might be necessary to perform the following: +## 1. Replace \< by [[:<:]] +## 2. Replace \> by [[:>:]] +## 3. Replace \' by \\' + color blue "\<[-]?[1-9][0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>" color cyan "\" color brightcyan "\<(true|false)\>"