nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit d04c8f88f1e640d5528dc8cb83c50a79b27b7500
parent a67f6c60317dc72b632ba2e8990248205510e6d6
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 22 Jul 2018 08:32:15 +0200

docs: say that 'cutwordright' is now bound to <Ctrl+Delete> by default

Also, suggest to rebind ^H to 'cutwordleft' so that <Ctrl+Backspace>
will delete the word to the left of the cursor (on some terminals).

Diffstat:
Mdoc/nano.texi | 4++++
Mdoc/nanorc.5 | 4++++
Mdoc/sample.nanorc.in | 12++++++++----
3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/doc/nano.texi b/doc/nano.texi @@ -1148,9 +1148,13 @@ current cursor position. @item cutwordleft Cuts from the cursor position to the beginning of the preceding word. +(This function is not bound by default. If your terminal produces +@code{^H} for <Ctrl+Backspace>, you can make <Ctrl+Backspace> delete +the word to the left of the cursor by rebinding ^H to this function.) @item cutwordright Cuts from the cursor position to the beginning of the next word. +(This function is bound by default to <Ctrl+Delete>.) @item cutrestoffile Cuts all text from the cursor position till the end of the buffer. diff --git a/doc/nanorc.5 b/doc/nanorc.5 @@ -498,9 +498,13 @@ current cursor position. .TP .B cutwordleft Cuts from the cursor position to the beginning of the preceding word. +(This function is not bound by default. If your terminal produces +\fB^H\fR for <Ctrl+Backspace>, you can make <Ctrl+Backspace> delete +the word to the left of the cursor by rebinding ^H to this function.) .TP .B cutwordright Cuts from the cursor position to the beginning of the next word. +(This function is bound by default to <Ctrl+Delete>.) .TP .B cutrestoffile Cuts all text from the cursor position till the end of the buffer. diff --git a/doc/sample.nanorc.in b/doc/sample.nanorc.in @@ -263,10 +263,14 @@ ## Key bindings. ## See nanorc(5) (section REBINDING KEYS) for more details on this. ## -## The following two functions are not bound to any key by default. -## You may wish to choose other keys than the ones suggested here. -# bind M-B cutwordleft main -# bind M-N cutwordright main +## The <Ctrl+Delete> keystroke deletes the word to the right of the cursor. +## On some terminals the <Ctrl+Backspace> keystroke produces ^H, which is +## the ASCII character for backspace, so it is bound by default to the +## backspace function. The <Backspace> key itself produces a different +## keycode, which is hard-bound to the backspace function. So, if you +## normally use <Backspace> for backspacing and not ^H, you can make +## <Ctrl+Backspace> delete the word to the left of the cursor with: +# bind ^H cutwordleft main ## Set this if your Backspace key sends Del most of the time. # bind Del backspace all