122
GitHub - ninrod/exato: EXATO: Evil XML Attributes Text Object
source link: https://github.com/ninrod/exato
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
EXATO: Evil XML Attributes Text Object
Installation
Just use MELPA. Here’s an oneliner using use-package:
(use-package exato :ensure t)
Usage
This package provides the x
text object to manipulate html/xml tag attributes.
You can customize the binding.
Try using dax
, vix
and gUix
.
Examples
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>
Customization
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"))
Credits
This package is inspired in Andrea Leopardi’s vim-textobj-xmlattr plugin.
LICENSE
GNU General Public License v3 Copyright (c) 2017-2021 Filipe Silva (ninrod)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK