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
The correct regexp is " \|.?$". The following code implements a new text object matching any nonspace character.
(evil-define-text-object evil-inner-space (count &optional beg end type)
"Select inner space."
:extend-selection nil
(evil-regexp-range count beg end type "[ \n]" " \\|.?$" t))