]> git.wh0rd.org Git - nano.git/commitdiff
Allowing inline comments with key bindings.
authorBenno Schulenberg <bensberg@justemail.net>
Sun, 17 Jan 2016 16:15:08 +0000 (16:15 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Sun, 17 Jan 2016 16:15:08 +0000 (16:15 +0000)
Patch by Mike Frysinger.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5568 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/syntax/nanorc.nanorc

index f4c8a3a8607cc5247cdec72fcebf98380db566d4..a8414ef654d690c11365c459ae43f9664f8983bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-01-17  Mike Frysinger  <vapier@gentoo.org>
+       * doc/syntax/nanorc.nanorc: Allow inline comments with key bindings.
+
 2016-01-15  Benno Schulenberg  <bensberg@justemail.net>
        * src/winio.c (set_modified): Plug another memory leak.
        * src/files.c (set_modified): Move this function to its habitat.
index 5741d5736589ad5e6811c1138f3c92403413ed48..47a9dd3f353d6b17578a3dcada53e1324b6b6db3 100644 (file)
@@ -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