I'm very new to vi, so sorry if this is a dumb question. I've recently learned about the list of keyword characters, and I've noticed that vi treats strings of characters not in that list as words also. Consider the following text:
Vim---is---a great editor
To any sensible human, this text contains five words. According to vi, there are seven. If I move with Shift+W instead of w, there are three.
If I have the above text in my buffer and I type 2w
, it will move the cursor to the beginning of is
. I find this behavior confusing and not especially useful, and I would like to find a way (either through a different key to press, a macro of some sort, or an editor setting) to treat the non-keyword characters as whitespace, so that the same motion would move the cursor to a
instead. Is such an act possible, either in vim or in neovim?
f
,F
,t
, andT
normal mode commands are useful in jumping the cursor to particular characters (and the,
and;
commands jump to the next/previous instance).