qstrahl/vim-dentures

Leading indentation not included in ai/aI edge case

Closed this issue · 3 comments

Sample code:

foo {
    one
    two

    three

    four
    five
    six
}

ai will include trailing whitespace for the "one/two" and "three" blocks, but in the edge case for "four/five/six", the leading whitespace will not be included. Vim's built-in text objects respect this edge case for ap and aw -- effectively, if there is no trailing whitespace, include leading whitespace.

I remember playing around with this. I think I had something working at some point, but it created ridiculous behaviour in a small number of cases. I actually noticed the absence of this feature a few days ago again. I'll take another look at it.

I'm pretty sure this isn't a thing any more. Also that you're crazy.

Just wanted to verify that it looks like it works now. Or maybe it always did and I'm crazy.