Just use MELPA. Here’s an oneliner using use-package:
(use-package exato :ensure t)
This package provides the x
text object to manipulate html/xml tag attributes.
You can customize the binding.
Try using dax
, vix
and gUix
.
cursor on []
- Issuing
dax
inside:
<a href="index.html" class="btn btn-primary [f]oo bar buz">link</a>
Results in:
<a href="index.html">link</a>
Exato
binds the x
key for you by default. You can change this with the exato-key
variable:
;; this will bind the `h` text object: so dah, dih, etc... will work instead of dax, dix...
(use-package exato
:ensure t
:init
(setq exato-key "h"))
This package is inspired in Andrea Leopardi’s vim-textobj-xmlattr plugin.
GNU General Public License v3
Copyright (c) 2017-2021 Filipe Silva (ninrod)