ELPA Logo NonGNU-devel ELPA: evil-exchange

evil-exchange Atom Feed

Description
Exchange text more easily within Evil
Latest
evil-exchange.tar (.sig), 2024-Mar-31, 20.0 KiB
Maintainer
Other versions:
release version
Website
http://github.com/Dewdrops/evil-exchange
ELPA's Repository
CGit or Gitweb
All Dependencies
evil (.tar)
cl-lib (.tar)
Badge

To install this package from Emacs, use package-install or list-packages.

Full description

NonGNU ELPA MELPA Build Status

English is not my first language, so feel free to correct any of my mistake.

evil-exchange

Easy text exchange operator for Evil. This is the port of vim-exchange by Tom McDonald.

Default bindings

gx (evil-exchange)

On the first use, define (and highlight) the first {motion} to exchange. On the second use, define the second {motion} and perform the exchange.

gX (evil-exchange-cancel)

Clear any {motion} pending for exchange.

Notes

Highlights

Installation

(require 'evil-exchange)
;; change default key bindings (if you want) HERE
;; (setq evil-exchange-key (kbd "zx"))
(evil-exchange-install)

evil-exchange is also available in melpa and is shipped with spacemacs.

Customization

You can change the default bindings by customizing evil-exchange-key and/or evil-exchange-cancel-key BEFORE evil-exchange-install is called.

Vim-compatible key bindings

Due to the way how evil (and emacs) implements key bindings, evil-exchange can't be bound to cx (which is the default bindings of the original vim plugin) by customizing evil-exchange-key option. If you prefer the key bindings suggested by vim-exchange, you can try the settings below:

(require 'evil-exchange)
(evil-exchange-cx-install)

The evil-exchange-cx-install function tries to mimic the original vim plugin's behaviour, i.e. cx in normal state bound to evil-exchange, cxc in normal state bound to evil-exchange-cancel, and X in visual state bound to evil-exchange.

Known Issues

Old versions

evil-exchange-0.41.0.20220111.55801.tar2024-Mar-3120.0 KiB
evil-exchange-0.41.0.20210225.132813.tar.lz2022-Jan-063.62 KiB