diff options
| author | James Nguyen <james@jojojames.com> | 2022-05-23 17:35:41 -0400 |
|---|---|---|
| committer | James Nguyen <james@jojojames.com> | 2022-05-23 17:35:41 -0400 |
| commit | 4336587f8ebae67e99f9d9c59daa8bf1cf1c51e4 (patch) | |
| tree | df9c891cb7dcf974ec9a2a0d890696358f452d0a | |
| parent | 8187b18e8f97e8e9d8f8f3a361966074f682bb04 (diff) | |
[Magit]: Add new customs to bind $ and 0
| -rw-r--r-- | modes/magit/evil-collection-magit.el | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modes/magit/evil-collection-magit.el b/modes/magit/evil-collection-magit.el index 395d29e..c827c81 100644 --- a/modes/magit/evil-collection-magit.el +++ b/modes/magit/evil-collection-magit.el @@ -102,6 +102,20 @@ When this option is enabled, the stash popup is available on \"Z\"." :group 'magit :type 'boolean) +(defcustom evil-collection-magit-use-$-for-end-of-line t + "When non nil, use \"$\" for `evil-end-of-line'. + +Move `magit-process-buffer' to \"`\"." + :group 'magit + :type 'boolean) + +(defcustom evil-collection-magit-use-0-for-beginning-of-line t + "When non nil, use \"0\" for `evil-beginning-of-line'. + +Move `magit-diff-default-context' to \"~\"." + :group 'magit + :type 'boolean) + (defcustom evil-collection-magit-state (if evil-collection-magit-use-y-for-yank 'normal 'motion) "State to use for most magit buffers." :group 'magit @@ -372,6 +386,14 @@ When this option is enabled, the stash popup is available on \"Z\"." (,states magit-mode-map "V" set-mark-command) (,states magit-mode-map ,(kbd "<escape>") evil-collection-magit-maybe-deactivate-mark))) + (when evil-collection-magit-use-$-for-end-of-line + `((,states magit-mode-map "$" evil-end-of-line) + (,states magit-mode-map "`" magit-process-buffer))) + + (when evil-collection-magit-use-0-for-beginning-of-line + `((,states magit-mode-map "0" evil-beginning-of-line) + (,states magit-mode-map "~" magit-diff-default-context))) + (when evil-collection-magit-use-z-for-folds `((,states magit-mode-map "Z" magit-stash) (,states magit-mode-map "z") |
