evilified: Generalize fix for key binding passthrough in visual state
This commit is contained in:
parent
8a7eb23ae7
commit
113c3bfc58
|
@ -221,14 +221,6 @@
|
||||||
(progn
|
(progn
|
||||||
(setq magit-last-seen-setup-instructions "1.4.0"
|
(setq magit-last-seen-setup-instructions "1.4.0"
|
||||||
magit-completing-read-function 'magit-ido-completing-read)
|
magit-completing-read-function 'magit-ido-completing-read)
|
||||||
|
|
||||||
(defun spacemacs/magit-status ()
|
|
||||||
"Open a magit status buffer"
|
|
||||||
(interactive)
|
|
||||||
(call-interactively 'magit-status)
|
|
||||||
(evil-surround-mode -1)
|
|
||||||
(evil-define-key 'visual magit-status-mode-map (kbd "s") 'magit-stage-item))
|
|
||||||
|
|
||||||
;; On Windows, we must use Git GUI to enter username and password
|
;; On Windows, we must use Git GUI to enter username and password
|
||||||
;; See: https://github.com/magit/magit/wiki/FAQ#windows-cannot-push-via-https
|
;; See: https://github.com/magit/magit/wiki/FAQ#windows-cannot-push-via-https
|
||||||
(when (eq window-system 'w32)
|
(when (eq window-system 'w32)
|
||||||
|
@ -236,7 +228,7 @@
|
||||||
(evil-leader/set-key
|
(evil-leader/set-key
|
||||||
"gb" 'magit-blame-mode
|
"gb" 'magit-blame-mode
|
||||||
"gl" 'magit-log
|
"gl" 'magit-log
|
||||||
"gs" 'spacemacs/magit-status
|
"gs" 'magit-status
|
||||||
"gC" 'magit-commit)
|
"gC" 'magit-commit)
|
||||||
(evilify magit-commit-mode magit-commit-mode-map
|
(evilify magit-commit-mode magit-commit-mode-map
|
||||||
(kbd "C-j") 'magit-goto-next-section
|
(kbd "C-j") 'magit-goto-next-section
|
||||||
|
|
|
@ -42,7 +42,16 @@
|
||||||
:tag " <Ev> "
|
:tag " <Ev> "
|
||||||
:enable (emacs)
|
:enable (emacs)
|
||||||
:message "-- EVILIFIED BUFFER --"
|
:message "-- EVILIFIED BUFFER --"
|
||||||
:cursor box)
|
:cursor box
|
||||||
|
(when (evil-evilified-state-p)
|
||||||
|
(when (bound-and-true-p evil-surround-mode)
|
||||||
|
(evil-surround-mode -1))
|
||||||
|
(setq-local evil-normal-state-map (cons 'keymap nil))
|
||||||
|
(setq-local evil-visual-state-map (cons 'keymap nil))
|
||||||
|
(add-hook 'evil-visual-state-entry-hook
|
||||||
|
(lambda () (interactive)
|
||||||
|
(local-set-key evil-visual-state-map "y" 'evil-yank))
|
||||||
|
nil 'local)))
|
||||||
|
|
||||||
;; default key bindings for all evilified buffers
|
;; default key bindings for all evilified buffers
|
||||||
(define-key evil-evilified-state-map (kbd dotspacemacs-leader-key)
|
(define-key evil-evilified-state-map (kbd dotspacemacs-leader-key)
|
||||||
|
|
Loading…
Reference in a new issue