Re: getting nicely justified comments in an easy way
Benno Schulenberg <[email protected]> Sun, 31 Mar 2019 13:44:56 +0200
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Seb, Op 30-03-19 om 23:23 schreef Seb: > Thanks for the patch. I did > cd src && patch chars.c 00*.patch > then recompiled and reinstalled nano, but it doesn't work. Ah. I forgot to say that it needs --autoindent in order to work. > I see on Savannah that ^W^Y and ^W^V are no longer supported. ^Home and ^End are > more logical, but they take the hands away from the center of the keyboard. Esc-/ > and Esc-\ do work, but so far I used the Esc key for switches: long lines, > autoindent, softwrapping now. It doesn't feel right to use it to navigate the > file. ^+Shift+Y/V would have made more sense. Control+Shift+letter always gives the same code as Control+letter -- under ncurses those keystrokes are indistinguishable. > I wonder if the upsides to the code > of eliminating ^W^Y really outweighs breaking compatibility with the entrenched > habits of millions of users. There is no --oldskool option. And it's marked on > Savannah as "Won't fix". I have been using ^W^Y for 24 years. Switching to > nano-4.0 would be a pain for weeks, for no obvious upside. Hmmm... Okay, I will bring back ^W^Y and ^W^V, as "blind keys": they will not be listed in the help lines nor in the help text, but they will work. See attached patch. But... millions of users? :) Of nano itself, maybe. But of the ^W^Y and ^W^V keystrokes, I doubt it. I quickly learned to use M-\ and M-/ (for most users the Alt key works), and I would use Ctrl+Home and Ctrl+End if I didn't have to hold the Fn key to get Home and End. > ^U no longer undoes ^J, I have to use M-U. Yes, the change of meaning of ^U right after a justification was an anomaly. I don't want to keep it for the sake of long-time users because it might surprise and frustrate newer users. > Surely there will be other surprises. > > If I did that to my users, a tenth of them would walk away feeling disrespected. > > Clean code and aesthetics are fine, Clean code and esthetics were not a consideration in removing ^Y and ^V from the WhereIs menu, but the simple fact that those keystrokes don't make sense there: they are not about searching but about jumping: so they should be (and are) in the GotoLine menu. Benno _______________________________________________ Help-nano mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-nano
0001-input-recognize-the-W-Y-and-W-V-legacy-keystrokes-ag.patch
(text/x-patch, 1.3 KB)
From 4e6c0ae7586bd69b349268b38b37bed7ec3acd51 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <[email protected]> Date: Sun, 31 Mar 2019 13:23:25 +0200 Subject: [PATCH] input: recognize the ^W^Y and ^W^V legacy keystrokes again The keystrokes are recognized and acted upon, but they are not visible in the menus nor in the help text, and they cannot be rebound. They are just there to not frustrate the muscle memory of long-time users. --- src/global.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/global.c b/src/global.c index 3dd07882..25a6b5f9 100644 --- a/src/global.c +++ b/src/global.c @@ -1306,9 +1306,13 @@ void shortcut_init(void) #ifdef ENABLE_JUSTIFY add_to_sclist(MGOTOLINE, "^W", 0, do_para_begin_void, 0); add_to_sclist(MGOTOLINE, "^O", 0, do_para_end_void, 0); +// add_to_sclist(MWHEREIS, "^W", 0, do_para_begin_void, 0); +// add_to_sclist(MWHEREIS, "^O", 0, do_para_end_void, 0); #endif add_to_sclist(MGOTOLINE, "^Y", 0, to_first_line, 0); add_to_sclist(MGOTOLINE, "^V", 0, to_last_line, 0); + add_to_sclist(MWHEREIS, "^Y", 0, to_first_line, 0); + add_to_sclist(MWHEREIS, "^V", 0, to_last_line, 0); #ifdef ENABLE_BROWSER add_to_sclist(MWHEREISFILE, "^Y", 0, to_first_file, 0); add_to_sclist(MWHEREISFILE, "^V", 0, to_last_file, 0); -- 2.20.1
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEv9AJBh5TUFKtDfIVDSjU0qCs6IQFAlygqEAACgkQDSjU0qCs 6ITpPA//fe0bVJGoBvjYoZcTEPV7LqE++SqdbhOfxD15gewES5e1Uok+XscaZpps 1hnUkczQdglZ6eraUtMGenwHDGGtgM0hXJO+DpYlF2chYU+WjZqW9pEVO1VkT0SF FxapvnzoxEySW019vlW0Wm1xrO4abBhIGcUxRwoiimWyAx4IlJzPuF7/+a9RBsjd D9A7bqfGH2+VtDrogmBnmsejYDW9S8UUv72qOe0Dmln2jCRaDd3Kb7+GGe84Rtqj GpngykbAZWLYH04E+/LzbxMOvriV37ZSt/iNkNzjqzobop++hgZUoeLTmRn5JAuE XMSxlm6ZDre68la+O5Vxz4+DGgQn3d8vwaz8sNXPbXaLH30zrFj1bqWPn+nKTvtt MRUFYTUOKOzfNX4AbqWVYyPtnPPFukVnDRSWDMFOIOEnGz2YSVaOgSAEeR4iwF0q JVtsrw8T3A1Dffe4VNh9JNuOGU7faoO8FrYKigXZeBov6R3KqR2X2op2p4SXTAra Avw3HKB32f0y9bnja41EfzW4R09ftiNGPiRHnsJM6we8zMYQL5RjRSS0LtOPk1Hw 3ybJUO8m8gT4e831YWbuMi5dBaoge1f2OgfRu8fZeeEpOYBMPFqo/A2f0DtZU00l Z0goDoHFeOE6JWjdsTMe60R7pDqRLk5F8F0JL6ChHpdZsg5xbn4= =BCwI -----END PGP SIGNATURE-----