Re: line folding

Benno Schulenberg <[email protected]>
Newsgroups gmane.editors.nano.devel
Message-ID <[email protected]>
Op 21-10-2024 om 17:02 schreef Benno Schulenberg:
> Maybe all this can be simplified to:
> 
> • If lines are selected, fold those lines or folds into one fold;
> • otherwise, if the current line is a fold, unfold it;
> • otherwise, jump to the next fold, if any.

What I mean to say is: if and when line folding gets implemented,
all that it should know is how to fold a marked region -- knowing
nothing about brackets or paragraphs or blank lines.

> Then, when the user wants to treat functions specially, they could
> define a custom keystroke for that (or simply rebind M-[):
> 
>    bind Sh-M-F "{search}{{}{enter}{mark}{findbracket}{fold}" main

As {search} does not exist, that should be:

   bind Sh-M-F "{whereis}{{}{enter}{mark}{findbracket}{fold}" main

> If they want the brackets to not be folded, they can add a {down}
> and an {up} before and after {findbracket}.

To be more precise:

   bind Sh-M-F "{whereis}{{}{enter}{down}{mark}{up}{findbracket}{up}{fold}" main

Would this behave in any way different from what you currently have
implemented, Rexy?


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

wsF5BAABCAAjFiEEFo5vQpe/16ea/USWUUu+Lrjhlh8FAmcXvVsFAwAAAAAACgkQUUu+Lrjhlh+b
oBAA7hfpmr6CiPYLWSsuRLE3MhhD25fkNY4lbQv2TvxMs5hVBx3YYVXf0KB2QL++vgkEc7VLaRKd
GtBtQcKKUa2ipT0vTu3lXMVSjGOZgM1QuBqEEkUOg2JnhL0pu5MblQZNZlvmdgHOfm5G6bNJoZoo
kcfKGJB+Q6Ky9+TUg7CJqkTGoeyjfzrd3tpixlz9JbDn0vkBWeoKVj3eyQWUkIpiafLzZ2VRAYfo
IDL+YtuRXPbT4tTSxZxy41ZWuxbwrdgFVWD8B5PYuoLw9nb34sSrFd074qrekJUvxlw1BYqGarkX
kRgCDsBSHpjpEJCAJ0KuvI1iRVCmgHjXNUj64W+KdrQc5aJcfuOlOtKoTi5ZlWOZoCjMFr08A/9f
cbAHjlMlps4eE1xbhr1gnnzAM10bqNMZAbvxG0oozMGOEL5mwkuiFgyqFwDFiblbNiEk3WPHvBtF
kwR6pe8kLR6DhMcT0BULTqaBosGmzfgDSaYgSUPzZOF+GVwapRF41QS/kPXgq6gb37wsZfHixJI+
XtxaawKJukkCX2PtJuz/m2gamOgUKoZU2B9wtvJk+pc7hDFflVyflmedZKBwji+KQ7654plnMX08
8EvASanpytct3Rh4Ah8nrekIic7+jusRxGfhrLx6AOivRoIpD94uISvkLeJRlritgZt0dNTxW9Ob
TAw=
=2xMr
-----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.