peey / evil-unimpaired

Port of evil-unimpaired code from spacemacs, for general evil use.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

evil-unimpaired

This repository contains a port of Tim Pope’s unimpaired.vim. This code was lifed from Spacemacs and you can find the original source here.

This package contains useful “pairs” of functions that are opposites of each other (e.g. next/previous buffer, paste above/below, etc). They are bound to the default leaders keys of [ and ].

Usage

evil-unimpaired is a global minor mode that can be enabled by calling (evil-unimpaired-mode) and disabled with (evil-unimpaired-mode -1)

default pairs

These pairs come included with evil-unimpaired

keyprevious functionnext function
SPCevil-unimpaired-insert-space-aboveevil-unimpaired-insert-space-below
bprevious-buffernext-buffer
fevil-unimpaired-previous-fileevil-unimpaired-next-file
tevil-unimpaired-previous-frameevil-unimpaired-next-frame
wprevious-multiframe-windownext-multiframe-window
pevil-unimpaired-paste-aboveevil-unimpaired-paste-below

For example you would use [ b to get previous buffer and ] f to get the next file

configuration

changing the the leader keys

the leader key can be set to any key or sequence of keys using evil-unimpaired-leader-keys

(setq evil-unimpaired-leader-keys '("gk" . "gj"))

adding or removing pairs

pairs can be added or removed by editing evil-unimpaired-default-pairs before evil-unimpaired-mode is enabled. They can also be added using evil-unimpaired-define-pair.

(evil-unimpaired-define-pair "e" (move-text-up . move-text-down) '(normal visual))
(evil-unimpaired-define-pair "q" (flycheck-previous-error . flycheck-next-error))

About

Port of evil-unimpaired code from spacemacs, for general evil use.

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%