Questions tagged [evil-text-object]
3 questions
2
votes
1 answer
evil text objects for code object at point?
I use text objects with evil like "i(" for the contents of the brackets. I would quite like "magic code aware text objects"?
This textobject would:
return the entire function if I was at a function
return the entire class if I was at a class
return…

Att Righ
- 725
- 4
- 14
1
vote
1 answer
How do I select the nearest `evil-text-object` enclosed in one of () [] {} <> without having to provide the paren char explicitly
I have problems when using the suggestion from here Code faster by extending Emacs EVIL text object
(require 'dash)
(defun jds~evil-paren-range (count beg end type inclusive)
(->> '((?\( . ?\))
(?\[ . ?\])
(?{ . ?})
…

jds
- 177
- 7
0
votes
1 answer
define a new evil command
I'm trying to reverse some words, and I have it set up where I can visually select them and hit ,rw to reverse them.
How do I set it up so ,rw also works with a motion. E.g. ,rw3w to reverse 3 words?
(defun reverse-words (beg end)
"Reverse the…

Zaz
- 123
- 6