[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the justifying of indented text
From: |
Seb |
Subject: |
Re: the justifying of indented text |
Date: |
Fri, 20 Dec 2019 22:41:54 +0100 (CET) |
User-agent: |
Alpine 2.21 (DEB 202 2017-01-01) |
Hi Benno,
Thanks alot for the history of the changes!
In short: When a file contains only pure text (paragraphs, bullet lists,
quotations, and such), there is no problem, nano will justify things
well. When a file contains only pure code and comments (like in a C or
Python file), there is no problem either: you will not type ^J on the
code lines, and nano is able to distinguish comments from code (through
quotestr) and will justify comments just fine.
The problem occurs when code and text are mixed. Or rather: when
*markup* (HTML) and *commands* (LaTeX, or whatever those \things are
called in LaTeX) are mixed with text without any intervening blank line.
Yes. Thanks for summarizing this clearly.
But this does not explain *why* the justifying of indented paragraphs
was prevented/disabled when autoindent is OFF. What purpose does this
serve? Well, one reason seems to be your use case: when text is mixed
with *indented* markup or directives, these should not be considered to
be part of any paragraph. This (or something similar) is what the above
explanation should have said.
There is that, but I think there is also another way to look at this. If
auto-indent is OFF, then a ^<Tab> was not magically added my Nano, it was
entered manually, deliberately, by the user. So it is reasonable for Nano
to trust that the user knows what he wants, in this particular part of
this particular file, better than a general algorithm, and to gracefully,
politely respect that choice.
Anyway, for your use case, I've improved the "Christmas-present" patch:
when autoindent is ON, you can also justify tab-indented long
quotations, and even tab-indented bullet lists.
Very nice, thank you!
Does this have any chance of making it into Nano's future release?
Kind regards,
Sébastien.