nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH 7/7] wrapping: when autoindenting, use indentati


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH 7/7] wrapping: when autoindenting, use indentation of next line as example
Date: Wed, 30 May 2018 21:04:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Op 27-05-18 om 11:15 schreef Benno Schulenberg:
> This new behavior is needed so that, when the user is writing prose
> and adds some text to the first line of a paragraph, that then the
> words that get auto-wrapped to a new line get the right indentation,
> so that a ^J will rewrap the paragraph as a whole instead of only
> the first line and the added line.
> 
> But I worry that when the user is writing code, that the new behavior
> is too unpredictable.

As the new behavior is needed only when automatic hard-wrapping is
enabled, I'm considering applying the attached patch.  When the user
writes code, she most likely uses 'set nowrap', and then, with the patch
applied, will not be surprised by nano guesssing wrong at the intended
indentation -- nano will instead behave as before: always use the same
indentation as the preceding line.

(If the user wants the "smarter" autoindent behavior also when writing
code, she could use something like 'set fill 444' -- that will enable
hard-wrapping but at a column that in normal code will never be reached.)

Benno

Attachment: 0001-wrapping-use-smart-autoindenting-only-when-hard-wrap.patch
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]