| From 17e1ba8530b9e21932935ad052ad416a0c2058a7 Mon Sep 17 00:00:00 2001 |
| From: Mike Frysinger <vapier@gentoo.org> |
| Date: Mon, 28 Nov 2011 15:37:02 -0500 |
| Subject: [PATCH] nanorc(5): fix bind/unbind documentation |
| |
| The unbind section is listed after valid key/menu/functions, but tries |
| to say those sections come after it. So reorganization the section so |
| that bind/unbind comes first, and then we cover the key/menu/functions |
| after both of them. |
| |
| Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
| --- |
| doc/man/nanorc.5 | 32 +++++++++++++++++++------------- |
| 1 file changed, 19 insertions(+), 13 deletions(-) |
| |
| diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 |
| index b9c0a19..3fc3c5d 100644 |
| --- a/doc/man/nanorc.5 |
| +++ b/doc/man/nanorc.5 |
| @@ -285,9 +285,19 @@ Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that |
| .SH KEY BINDINGS |
| Key bindings may be reassigned via the following commands: |
| .TP |
| -.B bind \fIkey\fP \fIfunction\fP \fImenu\fP |
| +.B bind \fIkey\fP \fIfunction\fP \fImenu\fP |
| Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the |
| -context of menu \fImenu\fP. The format of \fIkey\fP should be one of: |
| +context of menu \fImenu\fP. |
| +.TP |
| +.B unbind \fIkey\fP \fImenu\fP |
| +Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all |
| +menus by using \fIall\fP. Same key syntax as for binding. |
| +Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the |
| +context of menu \fImenu\fP. |
| +.TP |
| + |
| +The format of \fIkey\fP should be one of: |
| + |
| .TP |
| .B ^ |
| followed by an alpha character or the word "Space". |
| @@ -301,8 +311,10 @@ Example: M-C |
| followed by a numeric value from 1 to 16. |
| Example: F10 |
| .TP |
| -Valid function names to be bound include: |
| -.TP 3 |
| + |
| +Valid \fIfunction\fP names to be bound include: |
| + |
| +.TP 2 |
| .B help |
| Invoke the help menu. |
| .TP |
| @@ -509,8 +521,9 @@ Toggle whether long lines will be wrapped to the next line. |
| Toggle whether the suspend sequence (normally ^Z) will suspend the editor window. |
| .TP |
| |
| -Valid menu sections are: |
| -.TP |
| +Valid \fImenu\fP sections are: |
| + |
| +.TP 2 |
| .B main |
| The main editor window where text is entered. |
| .TP |
| @@ -552,13 +565,6 @@ The 'go to directory' menu. |
| .TP |
| .B all |
| A special name meaning: apply to all menus where this function exists. |
| - |
| -.TP |
| -.B unbind \fIkey\fP \fImenu\fP |
| -Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all |
| -menus by using \fIall\fP. Same key syntax as for binding. |
| -Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the |
| -context of menu \fImenu\fP. The format of \fIkey\fP should be one of: |
| .SH FILES |
| .TP |
| .I SYSCONFDIR/nanorc |
| -- |
| 1.8.1.2 |
| |
| From 0d49d9f0c62013e0d86169a92a2d0f5557e7be05 Mon Sep 17 00:00:00 2001 |
| From: Mike Frysinger <vapier@gentoo.org> |
| Date: Mon, 28 Nov 2011 15:38:26 -0500 |
| Subject: [PATCH] nanorc syntax: add bind/unbind commands |
| |
| We don't currently handle the bind/unbind commands, so adding them to |
| your nanorc file with colorization enabled makes it look like they're |
| not actually supported. |
| |
| Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
| --- |
| doc/syntax/nanorc.nanorc | 6 ++++-- |
| 1 file changed, 4 insertions(+), 2 deletions(-) |
| |
| diff --git a/doc/syntax/nanorc.nanorc b/doc/syntax/nanorc.nanorc |
| index 2c9f23a..494c2f4 100644 |
| --- a/doc/syntax/nanorc.nanorc |
| +++ b/doc/syntax/nanorc.nanorc |
| @@ -2,10 +2,12 @@ |
| ## |
| syntax "nanorc" "\.?nanorc$" |
| ## Possible errors and parameters |
| -icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$" |
| +icolor brightwhite "^[[:space:]]*((un)?(bind|set)|include|syntax|i?color).*$" |
| ## Keywords |
| icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|poslog|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|speller|suspend|suspendenable|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds|locking)\>" |
| -icolor green "^[[:space:]]*(set|unset|include|syntax|header|magic)\>" |
| +icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space)|F([0-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]+[[:alpha:]]+[[:space:]]*$" |
| +icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space)|F([0-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]*$" |
| +icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic)\>" |
| ## Colors |
| icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" |
| icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" |
| -- |
| 1.8.1.2 |
| |