help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help-nano Digest, Vol 178, Issue 1


From: Calvin Smith
Subject: Re: Help-nano Digest, Vol 178, Issue 1
Date: Thu, 12 Jan 2023 17:31:13 +0000 (UTC)

Hey donnie, i personally don't like ^W being the default search key for nano either, and i remapped searching to the F4 key.
Here is a reference page for all the keywords that you use to rebind the keys:

https://www.nano-editor.org/dist/latest/nano.html#Rebinding-Keys

it just has this simple format, it's a lot easier to do this in nano than in emacs or vim:

bind <key> <command> all

Here are the ways i've remapped my keys to make things faster and easier for me:

bind F12 mouse all  
bind F3 cancel all 
bind F4 whereis all 
bind F5 findnext all 
bind F6 findprevious all 
bind F7 wherewas all 
bind F8 gotoline all 
bind F9 execute all 
bind F10 insert all 
bind ^z chopwordleft all 
bind ^x chopwordright all 
bind ^h nextword all
bind ^g prevword all 
bind ^l end all 








On Thursday, January 12, 2023 at 12:03:19 PM EST, help-nano-request@gnu.org <help-nano-request@gnu.org> wrote:


Send Help-nano mailing list submissions to
    help-nano@gnu.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.gnu.org/mailman/listinfo/help-nano
or, via email, send a message with subject or body 'help' to
    help-nano-request@gnu.org

You can reach the person managing the list at
    help-nano-owner@gnu.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Help-nano digest..."


Today's Topics:

  1. Re: nano key bindings (Chris Allegretta)
  2. changing nano key bindings (Donnie Ferris)
  3. Re: nano key bindings (Victor Khong - Horsefly Realty)
  4. Re: changing nano key bindings (Benno Schulenberg)


----------------------------------------------------------------------

Message: 1
Date: Wed, 11 Jan 2023 19:13:05 +0000
From: Chris Allegretta <chrisa@asty.org>
To: Donnie Ferris <DonnyBahama@gmx.com>
Cc: help-nano <help-nano@gnu.org>, bensberg@telfort.nl
Subject: Re: nano key bindings
Message-ID:
    <k8wDJFTEjTGiEWPLKD1ayX8NuLbnpuD_srR3_GHnDESq7flWNoYSf9p3JzbiAvhnsJ6z3VJHCsARi_XiXdUdalV2TuDBgNPomKIGMF-U5gg=@asty.org>
   
Content-Type: text/plain; charset="utf-8"

Hi Donnie,

This would probably best be send to nano-help@ (and please send replies there) but it sounds like you want something like the following:

bind ^F whereis all
Or another suitable key binding. the nanorc man page will probably help you out here.

------- Original Message -------
On Wednesday, January 11th, 2023 at 2:05 PM, Donnie Ferris <DonnyBahama@gmx.com> wrote:

> Hello,
>
> The Ctrl+W key binding is utterly egregious. Every time I (forget and) try to search for text, it closes my browser tab and I lose EVERYTHING. I would like to change the key bindings so that they are more standard - Ctrl+C to copy, Ctrl+X to cut, Ctrl+V to paste, Ctrl+F to find text, etc.
>
> I'm not a C/C++ programmer, but this has happened one too many times One of these days, the blood pressure spike is going to kill me. I'd like to try changing the key bindings (and the text at the bottom that lists the most common ones) and compile from the modified source. I'm hoping I can make sense enough of the code to pull this off. Can you please point me in the right direction? nano.c seemed like the logical place to start but when I (opened it in xed and) searched for "binding" then (when nothing was found) "justify", I didn't find anything that seemed to be what I'm looking for.
>
> Thanks for your time and consideration.
>
> ~ Donnie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230111/d227b048/attachment.htm>

------------------------------

Message: 2
Date: Wed, 11 Jan 2023 20:10:35 +0100
From: Donnie Ferris <DonnyBahama@gmx.com>
To: help-nano@gnu.org
Subject: changing nano key bindings
Message-ID:
    <trinity-064e523b-4be4-484d-a8bb-81d55b5f1df2-1673464235031@3c-app-mailcom-bs13>
   
Content-Type: text/plain; charset="utf-8"

An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230111/991e34de/attachment.htm>

------------------------------

Message: 3
Date: Wed, 11 Jan 2023 11:24:57 -0800
From: Victor Khong - Horsefly Realty <cariboorealtor@gmail.com>
To: Chris Allegretta <chrisa@asty.org>
Cc: Donnie Ferris <DonnyBahama@gmx.com>, help-nano
    <help-nano@gnu.org>, bensberg@telfort.nl
Subject: Re: nano key bindings
Message-ID:
    <CANUzOoDemE5_e2Tr5CDAyG3BdbrnL5BtntfWSBRZoP9mD0Rong@mail.gmail.com" rel="nofollow" target="_blank">CANUzOoDemE5_e2Tr5CDAyG3BdbrnL5BtntfWSBRZoP9mD0Rong@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Donnie,

- Which version of nano are you using? The version you are using will
control whether custom keybindings work.
- Ensure there is a copy of this file in your home directory: .nanorc
(note the '.' before the 'nanorc' part of the filename). This is the
personalization file for nano.
- Edit .nanorc and add these bindings if not already present.

For commonly used keyboard shortcuts, study the next section. "^F" means
pressing CTRL and 'F" at the same time.

Placing an '#" in front of the line makes it inactive like so:
#bind ^F whereis all

These are active key bindings you want to have for commonly used

bind ^F whereis all
bind ^B findnext all
bind ^S savefile main
bind ^Z undo main
bind ^X cut all
bind ^C copy main
bind ^V paste all



On Wed, Jan 11, 2023 at 11:13 AM Chris Allegretta <chrisa@asty.org> wrote:

> Hi Donnie,
>
> This would probably best be send to nano-help@ (and please send replies
> there) but it sounds like you want something like the following:
>
> bind ^F whereis all
> Or another suitable key binding. the nanorc man page will probably help
> you out here.
>
> ------- Original Message -------
> On Wednesday, January 11th, 2023 at 2:05 PM, Donnie Ferris <
> DonnyBahama@gmx.com> wrote:
>
> Hello,
>
> The Ctrl+W key binding is utterly egregious. Every time I (forget and) try
> to search for text, it closes my browser tab and I lose EVERYTHING. I would
> like to change the key bindings so that they are more standard - Ctrl+C to
> copy, Ctrl+X to cut, Ctrl+V to paste, *Ctrl+F *to *find* text, etc.
>
> I'm not a C/C++ programmer, but this has happened one too many times  One
> of these days, the blood pressure spike is going to kill me. I'd like to
> try changing the key bindings (and the text at the bottom that lists the
> most common ones) and compile from the modified source. I'm hoping I can
> make sense enough of the code to pull this off. Can you please point me in
> the right direction? nano.c seemed like the logical place to start but when
> I (opened it in xed and) searched for "binding" then (when nothing was
> found) "justify", I didn't find anything that seemed to be what I'm looking
> for.
>
> Thanks for your time and consideration.
>
> ~ Donnie
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230111/eabef4b6/attachment.htm>

------------------------------

Message: 4
Date: Thu, 12 Jan 2023 11:11:26 +0100
From: Benno Schulenberg <bensberg@telfort.nl>
To: help-nano@gnu.org
Subject: Re: changing nano key bindings
Message-ID: <f311afe5-1af0-eba7-1d66-722fc0163b43@telfort.nl" rel="nofollow" target="_blank">f311afe5-1af0-eba7-1d66-722fc0163b43@telfort.nl>
Content-Type: text/plain; charset="utf-8"; Format="flowed"


Op 11-01-2023 om 20:10 schreef Donnie Ferris:
> I would like to change the key bindings so that they are more standard -
> Ctrl+C to copy, Ctrl+X to cut, Ctrl+V to paste, *Ctrl+F *to /find/ text, etc.

Have you had a look at the end of the sample nanorc file?

  tail -34 doc/sample.nanorc

(But as Victor says, it would be helpful to know which version of nano
you are using.  And do you compile nano yourself or do you use the nano
provided by your distro?)

> I'd like to try changing the key bindings (and the text at the bottom that
> lists the most common ones) and compile from the modified source.
There's no need to modify the source to change the key bindings.
Almost all bindings can be changed via your ~/.nanorc file.

Run 'man nanorc', and search for REBIND.

Benno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20230112/fdb7f598/attachment.sig>

------------------------------

Subject: Digest Footer

_______________________________________________
Help-nano mailing list
Help-nano@gnu.org
https://lists.gnu.org/mailman/listinfo/help-nano


------------------------------

End of Help-nano Digest, Vol 178, Issue 1
*****************************************

reply via email to

[Prev in Thread] Current Thread [Next in Thread]