Hi Christian,
I apologize for double posting.
May I suggest that you add a label after reviewing (or looking at) issues in Github? I received no feedback and for that reason assumed developers didn't give too much attention to Github. My bad... :)
Do you want to discuss this issue further in the mailing list, or on Github?
Thanks,
Vitor
Since you weren't able to replicate, I did some more testing. It appears that this only happens when 'expandtab' is set.
Could you please try on your side?
Thanks,
Vitor
BTW, when this option is not enable the problem does not appear, but the ';' is not appended to the second line as I would expect it to.
On Tuesday, 6 December 2016 16:20:06 UTC, Christian Brabandt wrote:
> Thanks, now I can confirm.
>
> Best,
> Christian
Although without the purpose of creating pressure, but doing so anyway...
Any updates in this regard?
Thanks!
Vitor
On Wednesday, 22 February 2017 12:36:17 UTC, Tony Mechelynck wrote:
> Also, the 'paste' setting might be significant:
> :set paste?
> And for a boolean option like this one, the question mark is important
> (":set paste" with no question mark sets the option to TRUE).
If you look at the test case I attached yesterday, you will see that 'paste' is not set.
Thanks!
Vitor
On Thursday, 23 February 2017 21:38:39 UTC, Christian Brabandt wrote:
> Would you rather not have the first line indented or abort if the indent
> changes the line?
Well, I would rather have the result in the expected.txt file, but taking
your question into account I can assume that's not so easy.
Typically, when doing column insertion every action appears "suspended"
until insertion mode is exited. Would it be possible to queue the call
to 'indentexpr' until that time? And maybe then apply it to all
previously selected lines?
Aborting is too much. For example, when doing column editing and text goes
over 'textwidth' a newline is inserted and what was being edited is simply
lost. This is not ideal behavior, but it doesn't abort. In my opinion,
coherency should be kept in this case.
So, if nothing else is possible I would say that it is best not to indent
at all.
Cheers,
Vitor
On Friday, 24 February 2017 14:24:13 UTC, Christian Brabandt wrote:
> That means, we cannot make Vim work like you prefer and have all indents
> reapplied as the text is changed per block line.
That's a pitty, as it would be the best approach.
On the other hand, I don't know if it wouldn't make sense to disable indent
and wrap altogether when appending in a visual block. It appears that only
"strange" things happen when any of those features is activated.
> However here is a first play patch, that at least makes Vim aware that
> indenting could have taken place and tries to adjust to it. Please check
> it out. It seems to work for my test cases so far.
>
> If it works okay, I'll add some test cases.
The end result is much better now. But I did some extra testing and noticed
that if the two lines start indented by 2*&sw (which means the first line will be de-indented), then the second line will not have the ; appended.
Other than that, at least from my point of view, the new behavior is more
acceptable than the original.
Thanks for your help!
Vitor
Hope everything's alright with you.
And since we're talking, any updates in this regard? ;P
Kind regards,
Vitor
Hi Bram and Christian,
Just noticed that this was included in latest vim, in patch 8.0.1041.
Thanks for your help solving this issue!
Cheers,
Vitor