[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] syntax: nanorc: allow comments in more places
From: |
Mike Frysinger |
Subject: |
[Nano-devel] [PATCH] syntax: nanorc: allow comments in more places |
Date: |
Fri, 15 Jan 2016 21:34:14 -0500 |
The nanorc syntax disallows inline comments in a bunch of cases like:
unbind F4 all # blah blah
Since nano has no problem with it, update the syntax file.
---
doc/syntax/nanorc.nanorc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/syntax/nanorc.nanorc b/doc/syntax/nanorc.nanorc
index 5741d57..47a9dd3 100644
--- a/doc/syntax/nanorc.nanorc
+++ b/doc/syntax/nanorc.nanorc
@@ -9,8 +9,8 @@ icolor brightred
"^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|lint
icolor brightgreen
"^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const(antshow)?|cut|fill|historylog|locking|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|pos(ition)?log|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|suspend|tabsize|tabstospaces|tempfile|unix|view|wordbounds)\>"
icolor yellow
"^[[:space:]]*set[[:space:]]+(functioncolor|keycolor|statuscolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
icolor brightgreen
"^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace)[[:space:]]+"
-icolor brightgreen
"^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(2|with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)+[[:space:]]*$"
-icolor brightgreen
"^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(2|with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)+[[:space:]]*$"
+icolor brightgreen
"^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(2|with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)+([[:space:]]+#|[[:space:]]*$)"
+icolor brightgreen
"^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(2|with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)+([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen
"^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|linter|formatter)[[:space:]]+.*$"
icolor green
"^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|formatter|extendsyntax)\>"
@@ -21,7 +21,7 @@ icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
# Strings
icolor brightmagenta ""(\\.|[^"])*""
# Comments
-icolor brightblue "^[[:space:]]*#.*$"
+icolor brightblue "(^|[[:space:]]+)#.*$"
icolor cyan "^[[:space:]]*##.*$"
# Trailing whitespace
--
2.6.2
- [Nano-devel] [PATCH] syntax: nanorc: allow comments in more places,
Mike Frysinger <=