Re: [PATCH] feature: relative line numbers
bsandro <[email protected]> Mon, 30 Jun 2025 19:46:08 +0300
| Newsgroups | gmane.editors.nano.devel |
|---|---|
| Message-ID | <aGK_UEm0Doy4NctG@fedora> |
Greetings and thanks for looking at my code! On 06/30/25, Benno Schulenberg wrote: >Interesting. I've tried it, but... don't like it. What is the point >of relative line numbers when nano does not have the relative movement >commands that vim has? Also, I find showing the absolute line number >for the current line (instead of zero) confusing. I like it as a helper to quickly judge the length of the block I'm working at; also it might be just a matter of habits or personal taste. Absolute line number for the current line is quite handy imo because status bar with that info is in different screen area in general or might be disabled altogether. >So, I'm not going to apply the patch. Fair enough! >(An improved version is attached, >that updates the screen also when 'relativenumbers' is toggled. Also, >I've renamed the option to 'relativenumbers', to stay in nano's style: >no abbreviations in the option names.) Very nice, thanks! I'll keep that one with my version :D >But what I might apply is the other attached patch: allow nano to jump >a relative amount of lines. Unfortunately, negative numbers already >mean "from end of buffer", so the patch accepts double signs to mean >"relative": ++100 will jump a hundred lines forward, --200 two hundred >lines back. Anyone interested in having this? I sure am, looks like a good feature especially to complement what I had in mind. -- bsandro.
signature.asc
(application/pgp-signature, 862 B)
-----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEKtcSzGJIWxEmOgE0Y6arLGv7p6cFAmhiv0ETHGVtYWlsQGJz YW5kcm8udGVjaAAKCRBjpqssa/unpyhMD/97YgZgkuvOMQXEMbxSvdS1+rwVXMeo YPDPDfZiHZGVGBUA2JCHsbV6hO3mgkIu04ehUwAil/tGHOWGt1ToNPacofYyja3W 7aAQFdHzYdrIWPPacj/vKmSUz3K/Z6jvqgDKz72DVG3NLoYLa6ZvCTnNXbHMBTd1 MhsPmNAyCCUB0vyXSEoIclFOev3qnKxYTKpRmi9hAfWZmpfoPn2eY/pNxLpUuwtJ GZNA0p4iuuiQAnYJ4CUfUuORxHHLVLMc59GtWENeS8f5nCQEkSVAiY7kir6v5mAH P/n69Mr+w4qXhnb4gMV/IjASU94GzEiy3wtLCuvOPOcaAYnNNaxJ5o2kw7p/Xp+6 QgglE7PRiwVoSvO3amPhBzbxzWFrifCyVC3Ft0t75vpuoYlFwz+IHEBo3ahDvwrh eUzMjAqhV0//iDBsmzY5WvrtZHm6DujPbdS/LWTKrA9TfjvwSUvw3FUe6W0jJY1R yJE7KOkOytLd30pPFo0KWYQE0nJADb+koojD0WRBm1qkXbBUkI7l2z5mHVki0dsS wDPKJSdgm7i501gennzOqwKLtjZjXrx58vQZIlUSbeyXHFeN/2rsDUwgeHxwfpi2 lOlxKgOo+uOQePr+RbCETo4XFFokLYLzaVjSYf7rsEX6Cwd9UB+2Y42akvEWaIgy SUHjGX3HWI81GA== =yvgG -----END PGP SIGNATURE-----