Move evil ex commands to feature/evil

These commands aren't used by config/default anyway, and
+default:multi-{next,previous}-line were moved to my private config.

Also fixes #1208 (:cd without args will now CD to $HOME).
This commit is contained in:
Henrik Lissner 2019-02-28 14:30:40 -05:00
parent cf07bac383
commit ad837e6d13
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 23 additions and 41 deletions

View file

@ -1,38 +0,0 @@
;; config/default/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :feature evil)
;;;###autoload (autoload '+default:multi-next-line "config/default/autoload/evil" nil t)
(evil-define-motion +default:multi-next-line (count)
"Move down 6 lines."
:type line
(let ((line-move-visual (or visual-line-mode (derived-mode-p 'text-mode 'magit-mode))))
(evil-line-move (* 6 (or count 1)))))
;;;###autoload (autoload '+default:multi-previous-line "config/default/autoload/evil" nil t)
(evil-define-motion +default:multi-previous-line (count)
"Move up 6 lines."
:type line
(let ((line-move-visual (or visual-line-mode (derived-mode-p 'text-mode 'magit-mode))))
(evil-line-move (- (* 6 (or count 1))))))
;;;###autoload (autoload '+default:cd "config/default/autoload/evil" nil t)
(evil-define-command +default:cd (path)
"Change `default-directory' with `cd'."
(interactive "<f>")
(cd path)
(message "Changed directory to '%s'" (abbreviate-file-name (expand-file-name path))))
;;;###autoload (autoload '+default:kill-all-buffers "config/default/autoload/evil" nil t)
(evil-define-command +default:kill-all-buffers (&optional bang)
"Kill all buffers. If BANG, kill current session too."
(interactive "<!>")
(if bang
(+workspace/kill-session)
(doom/kill-all-buffers)))
;;;###autoload (autoload '+default:kill-matching-buffers "config/default/autoload/evil" nil t)
(evil-define-command +default:kill-matching-buffers (&optional bang pattern)
"Kill all buffers matching PATTERN regexp. If BANG, only match project
buffers."
(interactive "<a>")
(doom/kill-matching-buffers pattern bang))