Tuesday, February 17, 2015

vim: least key stroke to replace a word

experts:
I know this looks stupid and simple, but I don't know the answer right now.

say I want to replace a word :

from:

abc 456

to:
123456

what I did is:
1. put my cursor in a, then cw123<esc>x , 7 strokes
2. put my cursor in b, then caw123<esc>, 7strokes
3. put my cursor in a, then dwi123<esc>, 7 strokes

it looks cw and dw behaves non-consistently, which I know is by the design.

I'm editing an old doc full of typos and spelling errors, etc, and I
need to do this quite often, does anyone knows of a
least-strokes-method (to protect my fingers) ?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: