5 ms·
>But it does, there is plenty of uncertainty: you can have a long sentence that wraps multiple lines, includes quotes and maybe code snippets with . inside them
by imbnwa 3y ago
>But it does, there is plenty of uncertainty: you can have a long sentence that wraps multiple lines, includes quotes and maybe code snippets with . inside them or just ..., so you can't easily tell where a sentence begins and where it ends.
If a sentence of length 'n' resides on a single line, wrapping on-screen, deleting the sentence is just 'dd'.
For more specific cases, Vim has three different visual highlighting modes that share commands one can apply to visual highlights. So in your example, I would initiate character-wise visual mode with 'v', type 'f.' to extend to the first period; then just repeat this until I found the extant period I wanted to include in the selection by pressing 'f.' as many times as necessary in the most vulgar case; or extend that selection to an obvious symbol near where I want to go, likely the one initiating an inline code block, so 't`' while in visual mode, placing the selection to the left of the opening inline code delimiter.
I've dabbled with Helix, a Kakoune-like, and it does not eliminate this problem of nested selection terminals; you're still required to trial and error since you can't immediately grok the coordinates of the nested period symbol you want to select to; both Vim and Kakoune's inputs only cover a first level.
There are popular extensions in the (neo)vim ecosystem that like EasyMotion that add ephemeral motion targets relative to your cursor position. I'm sure Kakoune has an equivalent. But there's no loss of behavior IMO between Vim and Kakoune here.
- eviks 3y ago> If a sentence of length 'n' resides on a single line, wrapping on-screen, deleting the sentence is just 'dd'. And if it's not? But this is wrong anyway, dd deletes the whole line, not the sentence Your recipe of repeat-searching for '.' is also a downgrade fail from text object selection since multiple cursors can have sentences with different number of periods > Vim has three different visual highlighting modes And not a single one comparable to the criticized one since vim's visual modes always extend, and you lose selections on going back to normal > still required to trial and error which is much easier to do when your converging on the correct selection visually without any edit commands shifting text all around you > But there's no loss of behavior IMO between Vim and Kakoune here. Earlier feedback is what's lost > EasyMotion How does this work with multiple cursors?
- Ringz 3y ago>> If a sentence of length 'n' resides on a single line, wrapping on-screen, deleting the sentence is just 'dd'. > And if it's not? But this is wrong anyway, dd deletes the whole line, not the sentence dd deletes the whole line and that’s exactly what he sad: If a sentence of length 'n' resides on a single line, wrapping on-screen, deleting the sentence is just 'dd'. Visual mode doesn’t always extend. Try o and O.
- eviks 3y ago> dd deletes the whole line and that’s exactly what he sad And that's exactly what I've addressed: "But this is wrong anyway, dd deletes the whole line, not the sentence" You're just repeating the same mistake. Sentences end with a period, they don't include spaces and newline on the same line after that, so deleting the whole line is simply the wrong operation even if you have 1 sentence per line, but also why should I care about such an artificially limited case when there is only 1 sentence per line??? Your O point also doesn't make sense: there is nothing to extend since the text is already selected
- Ringz 3y ago> And that's exactly what I've addressed: "But this is wrong anyway, dd deletes the whole line, not the sentence" You addressed something that nobody discussed, since nobody ever sad that dd deletes sentences. The mistake is on your side and you are repeating your own mistake. > Sentences end with a period, they don't include spaces and newline on the same line after that, so deleting the whole line is simply the wrong operation even if you have 1 sentence per line, but also why should I care about such an artificially limited case when there is only 1 sentence per line??? That's a little bit incoherent. Maybe provide an example? But I already provided: https://news.ycombinator.com/item?id=39475046 https://news.ycombinator.com/item?id=39475046 Your answer on that speaks for itself. > Your O point also doesn't make sense: there is nothing to extend since the text is already selected Wrong. You can extend selections. Read the manual. Another point is, and other users already mentioned it, that you are very rude. There is no reason for you to believe that you have absorbed wisdom with spoons while everyone else just watched. Your simple black and white view "Everyone is wrong" shows that quite clearly.