zmaas / evil-unimpaired

Port of evil-unimpaired code from spacemacs, for general evil use.
GNU General Public License v3.0
18 stars 4 forks source link

Additional commands not working #2

Closed gpanders closed 5 years ago

gpanders commented 5 years ago

I am trying to add the "]e" and "]q" commands like in the README. Here is my use-package declaration:

(use-package evil-unimpaired
  :load-path "site-lisp/evil-unimpaired"
  :config
  (use-package move-text :ensure t)
  (evil-unimpaired-define-pair "e" (move-text-up . move-text-down) '(normal visual))
  (evil-unimpaired-define-pair "q" (flycheck-previous-error . flycheck-next-error))
  (evil-unimpaired-mode))

When I restart Emacs, I get the following error Error (use-package): evil-unimpaired/:config: Wrong type argument: listp, move-text-down

zmaas commented 5 years ago

It looks like the issue here is that the list of commands is not properly quoted, and thus not interpreted as a list. Quoting the list of commands should fix the issue:

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

I've updated the examples in the README with these corrections in 009e080