links: 010 Vim MOC


Selecting words

The following commands can be used either in Visual Mode or after an operator

The command that starts with a select an object including white space where as i selects an inner object without white space. So i commands will select less text than a commands

You can combine a or i for yanking, deleting and many other operations

  • aw : Select a word with white space
  • iw : Select a word without white space

You can combine these for deleting and yanking for example

  • daw : delete a word with white space
  • diw : delete a word without white space

source: