3 ms·
What's the difference between bdw and daw? I already use "b", "e", and "w" quite a lot, so the "a" and "i" infixes seem a little redundant. Is there an advant
by sevensor 11y ago
What's the difference between bdw and daw? I already use "b", "e", and "w" quite a lot, so the "a" and "i" infixes seem a little redundant. Is there an advantage to the infixes that I'm not seeing?
- widdma 11y agoThe 'a' and 'i' in this context operate on text objects. They're much more powerful than motions. For example, beyond the 'w' for word, there is 'p' for paragraph, '"' for double quotes. All of these allow you to edit the object while the cursor is inside them.
- sevensor 11y agoInteresting. I'd have to use ?" and /" for double quotes, although I do have () and {} for sentences and paragraphs. I'll have to go back to the documentation -- I suppose there's a "whatever is within the current pair of parentheses" text object? I could see using that quite a lot.
- sooheon 11y agoTry doing `cas` (change a sentence) or `dib` (delete in brackets), and on and on for all your different text objects. This infix notations are not redundant, because they are not motions like `b` `e` `w` are, but adjectives to be applied to the nouns which are text objects.
- sevensor 11y agoIt looks like I need to learn what the text objects are. I learned vi about 20 years ago, and I've been using vim like vi ever since.