Short answer: No.
Long answer: evil-maps.el
defines inner and outer text objects, dW
and dB
corresponding to the following outer ones:
(define-key evil-outer-text-objects-map "W" 'evil-a-WORD)
(define-key evil-outer-text-objects-map "B" 'evil-a-curly)
Their definition in evil-commands.el
:
(evil-define-text-object evil-a-WORD (count &optional beg end type)
"Select a WORD."
(evil-select-an-object 'evil-WORD beg end type count))
(evil-define-text-object evil-a-curly (count &optional beg end type)
"Select a curly bracket (\"brace\")."
:extend-selection nil
(evil-select-paren ?{ ?} beg end type count t))
You'll have to define your own text objects instead. The API for that is that a text object is expected to be a range of start and end position. evil-select-an-object
is the most generic way of doing this, it repurposes the thingatpt.el
API for which defines objects in terms of forward (and optionally backward) movement. This means that all that's necessary to use evil-WORD
as argument, is to define forward-evil-WORD
. Look at its definition to get an idea how simple it is to define a custom version of that:
(defun forward-evil-WORD (&optional count)
"[...]"
(evil-forward-nearest count
#'(lambda (&optional cnt)
(evil-forward-chars "^\n\r\t\f " cnt))
#'forward-evil-empty-line))
Chances are you only need to adjust the charset passed to evil-forward-chars
.
For the other text object, tricky, you'd most certainly be better off defining text objects for symbols and s-expressions. This has been done before: https://github.com/luxbock/evil-cleverparens