feat: evil improvements & magit keybinds

This commit is contained in:
Muhammad Nauman Raza 2022-11-09 18:04:45 +00:00
parent 1d9a1f8f59
commit 4e94b9ba4a
No known key found for this signature in database
GPG key ID: A9A36C429C9CAE31
2 changed files with 23 additions and 0 deletions

View file

@ -9,11 +9,24 @@
;;; evil - A Vi Layer inside of Emacs ;;; evil - A Vi Layer inside of Emacs
(use-package evil (use-package evil
:custom :custom
(evil-want-keybinding nil) ; Make room for evil-collection
(evil-want-integration t) ; Same as above (evil-want-integration t) ; Same as above
(evil-undo-system 'undo-fu) ; Set the undo/redo system (evil-undo-system 'undo-fu) ; Set the undo/redo system
:config :config
(evil-mode 1)) (evil-mode 1))
;; evil-collection - A collection of keybinds for evil
(use-package evil-collection
:custom (evil-collection-setup-minibuffer t)
:init (evil-collection-init))
;; evil-escape - Escape from insert mode using jk
(use-package evil-escape
:config
(setq-default evil-escape-key-sequence "jk")
:init
(evil-escape-mode 1))
;; undo-fu, used by evil for undo/redo functionality ;; undo-fu, used by evil for undo/redo functionality
(use-package undo-fu) (use-package undo-fu)

View file

@ -9,5 +9,15 @@
"f f" '(find-file :wk "Find File") "f f" '(find-file :wk "Find File")
"f s" '(save-buffer :wk "Save Buffer")) "f s" '(save-buffer :wk "Save Buffer"))
;; Magit
(general-create-definer diancite/magit
:prefix leader-key)
(diancite/magit
:keymaps 'normal
"m s" '(magit-status :wk "Status")
"m d" '(magit-dispatch :wk "Dispatch")
"m f" '(magit-status :wk "File Dispatch"))
;; Provide file file init.el ;; Provide file file init.el
(provide 'keybinds) (provide 'keybinds)