vim Vim Text Objects Select a word without surrounding white space


Example

Suppose we want to select a word without surrounding white spaces, use the text object iw for inner word using visual mode:

  1. Got to normal mode by pressing ESC

  2. Type viw at the beginning of a word

  3. This will select the inner word

    viw