Hacker News new | ask | show | jobs
by omtose 3470 days ago
>How would that work if the motion comes first? Would I go "wwwwd"? Would that delete one word, or four?

'w' will move the current selection to the next word so only one word. To extend the selection you need to press 'W' so "wWWWd" will delete four words. For most motions (if not all), the uppercase variant will extend the current selection.

This also makes searching slightly different:

  / search forwards 
  ? extend selection forward
  <a-/> search backwards
  <a-?> extend selection backwards
2 comments

Can you add counts to motions/objects? I.e. does "3w" select three words you can act on, or do you have to go "wWW"?
3w works
as well as 3W, for a different purpose
w irritates me, because it always traverses a bunch of miscellaneous symbols, and my brain can't parse fast enough to easily tell in advance how many times I'll have to press w in order to get where I want. Extremely minor, but extremely niggly annoyance. I've found myself using https://github.com/justinmk/vim-sneak more and more often.
You might also like quick-scope:

https://github.com/unblevable/quick-scope