vim mode: Add tests covering word selection behavior.
vim mode: Fix off-by-one errors in word selection.

The below conforms to Vim's behavior regarding whitespace trimming.