Re: nano: make configuring key bindings easier for users
Steef Boerrigter <[email protected]> Tue, 5 May 2026 16:49:15 -0400
| Newsgroups | gmane.editors.nano.devel |
|---|---|
| Message-ID | <CAFe6kZsLQYd+8CLxkaZ01dFDpEfTjQ3pJ5qhUVaC2WnhAPqkNA@mail.gmail.com> |
--000000000000e092f10651182e2b Content-Type: multipart/alternative; boundary="000000000000e092f10651182e29" --000000000000e092f10651182e29 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi again, I realized I made a mistake. Both versions of the nanorc file were being saved in the folder which holds the syntax files. I added a configure option that lets the user choose the modern key settings. The correct settings file is then installed to /usr/local/etc/nanorc accordingly. Let me know if you need me to repackage all changes into a single commit. Steef On Tue, May 5, 2026 at 1:37=E2=80=AFPM Steef Boerrigter <[email protected]>= wrote: > Hi, > > I spent a significant amount of time figuring out how to configure nano > key bindings to fit them to my needs. > I found a lot of bindings and command names that are basically hidden in > the source code and I don't think that is a good idea. > What I did is to take out all the hard-coded key bindings and put all > commands in well-organized nanorc file. That way, a user has much more > overview of the available commands and better control of which key they d= o > and don't want to have configured. > > The sample.nanorc file (and some command line option) support more modern > key strokes. I created two different nanorc examples, that, hopefully, be= st > reflect the exact configuration one would have obtained if using the > configuration options at the bottom of that file. > > I hope you like what I did. > > Best regards, > Met vriendelijke groet, > Steef Boerrigter > > --000000000000e092f10651182e29 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hi again,</div><div><br></div><div>I realized I made = a mistake.</div><div>Both versions of the nanorc file were being saved in t= he folder which holds the syntax files.</div><div>I added a configure optio= n that lets the user choose the modern key settings. The correct settings f= ile is then installed to /usr/local/etc/nanorc accordingly.</div><div><br><= /div><div>Let me know if you need me to repackage all changes into a single= commit.<br></div><div><br></div><div>Steef</div><div><br></div></div><br><= div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"g= mail_attr">On Tue, May 5, 2026 at 1:37=E2=80=AFPM Steef Boerrigter <<a h= ref=3D"mailto:[email protected]">[email protected]</a>> wrote:<br></div>= <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Hi,= </div><div><br></div><div>I spent a significant amount of time figuring out= how to configure nano key bindings to fit them to my needs.</div><div>I fo= und a lot of bindings and command names that are basically hidden in the so= urce code and I don't think that is a good idea.</div><div>What I did i= s to take out all the hard-coded key bindings and put all commands in well-= organized nanorc file. That way, a user has much more overview of the avai= lable commands and better control of which key they do and don't want t= o have configured.</div><div><br></div><div>The sample.nanorc file (and som= e command line option) support more modern key strokes. I created two diffe= rent nanorc examples, that, hopefully, best reflect the exact configuration= one would have obtained if using the configuration options at the bottom o= f that file.</div><div><br></div><div>I hope you like what I did.</div><div= ><br></div><div>Best regards,</div><div>Met vriendelijke groet,</div><div>S= teef Boerrigter</div><div><br></div></div> </blockquote></div> --000000000000e092f10651182e29-- --000000000000e092f10651182e2b Content-Type: text/x-patch; charset="US-ASCII"; name="nanorc_installation.patch" Content-Disposition: attachment; filename="nanorc_installation.patch" Content-Transfer-Encoding: base64 Content-ID: <f_mot3p0hb0> X-Attachment-Id: f_mot3p0hb0 ZGlmZiAtLWdpdCBhL2NvbmZpZ3VyZS5hYyBiL2NvbmZpZ3VyZS5hYwppbmRleCA4ZTc3MWI5YS4u MzdmMjM0YTEgMTAwNjQ0Ci0tLSBhL2NvbmZpZ3VyZS5hYworKysgYi9jb25maWd1cmUuYWMKQEAg LTMwOCw2ICszMDgsMTMgQEAgaWYgdGVzdCAieCRlbmFibGVfbmFub3JjIiAhPSB4bm87IHRoZW4K IAluYW5vcmNfc3VwcG9ydD15ZXMKIGZpCiAKK0FDX0FSR19FTkFCTEUobW9kZXJuLWNvbmZpZywK K0FTX0hFTFBfU1RSSU5HKFstLWVuYWJsZS1tb2Rlcm4tY29uZmlnXSwgW0luc3RhbGwgbW9kZXJu Lm5hbm9yYyBhcyB0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