Can I remap WORD
or W
key in VIM normal mode? The original W
traverse text separated with white space. I'd like the motion W
to be mapped as traversing text-object including word
and .
, -
.
For example:
some-object=another.object
if I press viW
on some-object
I'd like to see some-object
selected rather than some-object=another.object
selected as in the original setup.
Is there a way for me to make this change? Where should I look up in vimdoc?
You could lookup in vim-help with
:h WORD
:h motion
I just did this and my guess is, you have to write a function and map it to W
. I read :h WORD
(capital letters!) that there is no way to change the standard definition of a "WORD"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.