In short: how do I define a regex that matches 'iskeyword'
.
My initial thought was that match(str, '\w*')
would match an arbitrary number of keyword characters in str
, but it really only matches to a predefined list (as confirmed by :h \w
). Of course, I could manually make up a target with []
, but that does not feel right. Am I missing something here?