From d04c8f88f1e640d5528dc8cb83c50a79b27b7500 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 22 Jul 2018 08:32:15 +0200 Subject: [PATCH] docs: say that 'cutwordright' is now bound to by default Also, suggest to rebind ^H to 'cutwordleft' so that will delete the word to the left of the cursor (on some terminals). --- doc/nano.texi | 4 ++++ doc/nanorc.5 | 4 ++++ doc/sample.nanorc.in | 12 ++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/nano.texi b/doc/nano.texi index 5e87779e..87f65092 100644 --- 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 , you can make 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 .) @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 index fa9586d8..1ae77ae4 100644 --- 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 , you can make 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 .) .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 index 3fd4de90..c5d0f60c 100644 --- 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 keystroke deletes the word to the right of the cursor. +## On some terminals the keystroke produces ^H, which is +## the ASCII character for backspace, so it is bound by default to the +## backspace function. The key itself produces a different +## keycode, which is hard-bound to the backspace function. So, if you +## normally use for backspacing and not ^H, you can make +## 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