3 ms·
So if I want to erase one word to write another, instead of ctrl+delete or ctrl+backspace, I need to switch to visual model, delete the word, switch to insert m
by AlienRobot 2y ago
So if I want to erase one word to write another, instead of ctrl+delete or ctrl+backspace, I need to switch to visual model, delete the word, switch to insert mode, and type it?
Doesn't sound more efficient than VS code to me.
- koakuma-chan 2y agoYou need to press `ves` and type the new word. Trust me, it's really fast.
- flykespice 2y ago'cw' is way faster, no need to enter visual mode (don't rely too much on it)
- koakuma-chan 2y agoVisual mode is way more practical because you don't always need to edit a word, you might need to edit a few words and/or things that are not words. I always use visual mode to see clearly what I'm changing.
- cbm-vic-20 2y agoThe power of the vi-family is that this generalizes consistently. Want to replace everything from here to the next comma? 'ct,TYPE STUFF HERE' I'm not a very accurate mouser, so with a GUI editor without sufficient vi-ness, that means I need to use the mouse to drag a selection, make sure I don't also grab the tiny comma, then start typing. So annoying.
- koakuma-chan 2y agoI can't believe people actually use their mouse to select text.
- bencornia 2y ago> The power of the vi-family is that this generalizes consistently. Absolutely! It takes learning relatively few command/motion combos before you are really cooking. The commands are fairly composable as well. I rarely find myself without being able to find a command that can't do what I want. To be fair it takes some time to learn all the commands but eventually you just forget about it and it becomes automatic.
- theonething 2y agoNope, you go to the word, do 'cw' (change word). That deletes the word under your cursor and automatically puts you in insert mode. Then you write your new word. I love it.
- cka 2y agoOr 'caw' if you want to change the whole word, even if cursor is in the middle somewhere. I read it as "change a word".
- theonething 2y agohmm.. I've always used 'ciw'. What's the difference with 'caw'?
- xigoi 2y agociw only deletes the letters, whereas caw also deletes one surrounding space. It’s more useful for other operations such as copying (yaw).