It looks like your understanding is inverted. By adding -
to iskeyword
, you're telling Vim that it's just a regular word
character that should be skipped over by things like w
or b
.
Instead, you want to remove it1:
set iskeyword-=-
Based on your posted iskeyword
, that should do the trick, but it's possible that others (or future you) might have a range that includes -
. You can explicitly exclude a character (or range) by prepending it with ^
when adding it (and making sure it's to the right of the range that would otherwise include it):
set iskeyword+=^-
1) The fact that the hyphen was not the last thing in your set iskeyword?
might be a hint that it was already in there, meaning your set iskeyword+=-
was a noop.