I am trying to create a new text object in Evil. For example, the text object iw will only select subsets of strings containing hyphens. I want the new text object to m
I don't think you need to create a new text object. Evil includes the symbol text object. The symbol syntax is defined by the major-mode and usually includes hyphens, numbers, underscores and other non-whitespace characters.
The symbol text object is bound to o
. The definition is at evil-maps.el at Bitbucket