/exato

:bookmark: EXATO: Evil XML Attributes Text Object

Primary LanguageEmacs LispOtherNOASSERTION

EXATO: Evil XML Attributes Text Object

https://travis-ci.org/ninrod/exato.svg?branch=master https://melpa.org/packages/exato-badge.svg https://stable.melpa.org/packages/exato-badge.svg https://img.shields.io/badge/license-GPLv3-blue.svg

https://www.w3schools.in/wp-content/uploads/2014/07/HTML-attribute.jpg

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)