On So, 05 Dez 2021, Gary Johnson wrote:

> On 2021-11-18, Bram Moolenaar wrote:
> > Patch 8.2.3615
> > Problem:    When re-formatting with an indent expression the first line of a
> >             paragraph may get the wrong indent. (Martin F. Krafft)
> > Solution:   Apply the correct indenting function for the first line.
> >             (Christian Brabandt, closes #9150, closes #9056)
> > Files:      src/textformat.c, src/testdir/test_indent.vim
> 
> This new behavior is a bug.  It has made vim less useful.
> 
> When I want to format, I want to format.  When I want to indent,
> I want to indent.  I don't want formatting, e.g., gq, to also
> indent.
> 
> I frequently have text that I have manually indented to my liking,
> and I then want to format it so that the lines are properly wrapped.
> I want those lines wrapped according to the current indentation, not
> the current indentation rules.  If I want it indented according to
> the current indentation rules, I will indent it with = first.
> 
> Please fix this.

The old behaviour already applied the indenting settings to all lines 
*except* for the very first line, which caused inconsistent indented 
lines. The patch simply makes sure to also apply the indenting to the 
very first line.

I was also a bit confused that indenting applied to lines being 
formatted because I always thought indenting and auto-formatting are 
some different features. But I believe when auto-formatting and Vim is 
breaking a very long line, it does make sense to apply the indenting 
settings to the line being split.

Changing this behaviour now may break other users expectations. So I am 
not sure how to fix this.

Best,
Christian
-- 
Der Teich kippt um, die Fische üben bereits Rückenschwimmen.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211206081238.GE972099%40256bit.org.

Raspunde prin e-mail lui