Cleaned up magit config

This commit is contained in:
Emmet 2023-10-26 21:28:55 -05:00
parent 9eaf21e457
commit c80e0350cc
2 changed files with 0 additions and 62 deletions

View file

@ -1096,7 +1096,6 @@ tasks."
:nvmeg "d" 'org-timeblock-set-duration) :nvmeg "d" 'org-timeblock-set-duration)
;;;------ magit configuration ------;;; ;;;------ magit configuration ------;;;
;; Need the following two blocks to make magit work with git bare repos ;; Need the following two blocks to make magit work with git bare repos
(defun ~/magit-process-environment (env) (defun ~/magit-process-environment (env)
"Add GIT_DIR and GIT_WORK_TREE to ENV when in a special directory. "Add GIT_DIR and GIT_WORK_TREE to ENV when in a special directory.
@ -1112,36 +1111,6 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)."
(advice-add 'magit-process-environment (advice-add 'magit-process-environment
:filter-return #'~/magit-process-environment) :filter-return #'~/magit-process-environment)
(evil-set-initial-state 'magit-status-mode 'motion)
(evil-set-initial-state 'magit-log-mode 'motion)
(evil-set-initial-state 'magit-diff-mode 'motion)
(evil-set-initial-state 'magit-refs-mode 'motion)
(evil-define-key 'motion magit-status-mode-map
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line
"c" 'magit-commit
"s" 'magit-stage
"u" 'magit-unstage
"l" 'magit-log
"F" 'magit-pull
"p" 'magit-push
"q" '+magit/quit
(kbd "<return>") 'magit-diff-visit-file-worktree)
(evil-define-key 'motion magit-log-mode-map
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line
"q" '+magit/quit
(kbd "<return>") 'magit-visit-ref)
(evil-define-key 'motion magit-diff-mode-map
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line
"q" '+magit/quit
(kbd "<return>") 'magit-visit-ref)
(evil-define-key 'motion magit-refs-mode-map
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line
"q" '+magit/quit
(kbd "<return>") 'magit-visit-ref)
(require 'magit-todos) (require 'magit-todos)
(magit-todos-mode 1) (magit-todos-mode 1)

View file

@ -1264,7 +1264,6 @@ On Wayland, EAF doesn't work.
** Magit Configuration ** Magit Configuration
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
;;;------ magit configuration ------;;; ;;;------ magit configuration ------;;;
;; Need the following two blocks to make magit work with git bare repos ;; Need the following two blocks to make magit work with git bare repos
(defun ~/magit-process-environment (env) (defun ~/magit-process-environment (env)
"Add GIT_DIR and GIT_WORK_TREE to ENV when in a special directory. "Add GIT_DIR and GIT_WORK_TREE to ENV when in a special directory.
@ -1280,36 +1279,6 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)."
(advice-add 'magit-process-environment (advice-add 'magit-process-environment
:filter-return #'~/magit-process-environment) :filter-return #'~/magit-process-environment)
(evil-set-initial-state 'magit-status-mode 'motion)
(evil-set-initial-state 'magit-log-mode 'motion)
(evil-set-initial-state 'magit-diff-mode 'motion)
(evil-set-initial-state 'magit-refs-mode 'motion)
(evil-define-key 'motion magit-status-mode-map
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line
"c" 'magit-commit
"s" 'magit-stage
"u" 'magit-unstage
"l" 'magit-log
"F" 'magit-pull
"p" 'magit-push
"q" '+magit/quit
(kbd "<return>") 'magit-diff-visit-file-worktree)
(evil-define-key 'motion magit-log-mode-map
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line
"q" '+magit/quit
(kbd "<return>") 'magit-visit-ref)
(evil-define-key 'motion magit-diff-mode-map
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line
"q" '+magit/quit
(kbd "<return>") 'magit-visit-ref)
(evil-define-key 'motion magit-refs-mode-map
"j" 'evil-next-visual-line
"k" 'evil-previous-visual-line
"q" '+magit/quit
(kbd "<return>") 'magit-visit-ref)
(require 'magit-todos) (require 'magit-todos)
(magit-todos-mode 1) (magit-todos-mode 1)