Re: line folding

Benno Schulenberg <[email protected]>
Newsgroups gmane.editors.nano.devel
Message-ID <[email protected]>
Op 11-10-2024 om 14:18 schreef Seb:
> * I select some lines of text with Shift+Arrow key.
> 
> * I then press M-[ to visually replace the selected (complete) lines by a
>    single line which may for instance look something like
>      ====> (folded lines 237 to 274) <====
> 
> * To unfold the lines, I place the cursor on the line above and press M-[.

Right -- when a region is selected, or when the cursor is on a folded part,
it is quite obvious what M-[ should do.  But what should M-[ do by default,
when nothing is selected and the cursor is on a normal line?

Having no experience with line folding, I would expect M-[ to do some default
folding action, for example: from the current line until the next blank line,
or: when the cursor is somewhere in a block (delimited by blank lines), to
fold that block...  What do other folding editors do in such cases?


> (As an aside: why doesn't Shift+PageUp/Down select lines too (Nano 7.2)?)

That's because you're using urxvt and urxvt produces strange, non-conforming
escape sequences for modified movement keys.  Add the following two lines to
your ~/.Xresources file, restart, and the mentioned keystrokes should work:

   URxvt.keysym.S-Page_Up: \033[5;2~
   URxvt.keysym.S-Page_Down: \033[6;2~


Benno
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEFo5vQpe/16ea/USWUUu+Lrjhlh8FAmcKTjIFAwAAAAAACgkQUUu+Lrjhlh+p
rxAAlycWZStVv8PV9di0X8vGE4hI8TCpDahL1xyWq4OyVlm8A7IFqHEpyob4AHOoB+YRzosAKZDA
t1ipkeos2aCtL3xQ2DIdb+4yu29r2MtBcZdzFyqruWUq4f7HQY4a8fvzTa9b5VsUsEBD1pEXQZFw
TJFfwVDjlMfSW/I5f/LtykiQgmHX5KuXI0BvT2tQLAgOLkVdB6/yHW3zzS1KK0ptWCEaBFmqB0Ud
ZdUXhvaCPe2ootAi8UAPt+Pdl0wGjk741jx1ZDlK5paufxrh5dnGHIAe2J5yck5dHBw5Jbn77Dni
89yRJqyrK/PEeEYWnpZ3FLL41pUPiMApKRhjG9mR8PH1N2//htxRBF82NX6D1yC/9/7pMoELmJ48
gFlO31v4dbtgUlCHgnnmpH5bFkMKMVZAMFfxA+bTzCjNS2KHEiAJagB+ZnBhFP+R18Rroj0y+him
t5KBfG6/QVX0Um2KploUqXd5T9ecFAPkHCMZP4MTeqGzqMYfPSbxB6GdclUlrER2Fpl1emeKockb
iyoGEaAEDeGHX6zdzRSWvjT21nojAbDtzlTz4+GQpLRsCwRJWM2CVC6gA2cN5BiFNe2ORv0AMYUr
SpwSITTmuvgmLcjezGATGMhBr41T0HLK+h0gtZErJIYUfyzR3v1tYe9Upr0cW8V9oYz6BYihXgCr
dac=
=rIGU
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.