Add magit-gitflow and fix the f
issue for feature
The solution to fix the `f` binding issue is to not alter emacs-state-map. By keeping emacs map untouched we have a fallback for modes like magit-gitflow which require the `f` key. Indeed with the current implementation of the `fd` sequence it is not possible to guess what the `f` key must do for a given mode. The only solution for now is to keep one not modified state map (emacs is a good candidate for this).
This commit is contained in:
parent
e4fb38b383
commit
b36b43a054
1 changed files with 9 additions and 3 deletions
|
@ -71,6 +71,7 @@
|
|||
ledger-mode
|
||||
less-css-mode
|
||||
magit
|
||||
magit-gitflow
|
||||
markdown-mode
|
||||
markdown-toc
|
||||
monokai-theme
|
||||
|
@ -294,6 +295,8 @@ DELETE-FUNC when calling CALLBACK.
|
|||
`(lambda () (interactive)
|
||||
(spacemacs/escape-state
|
||||
',seq nil t nil 'abort-recursive-edit nil 'evil-ex-delete-backward-char)))
|
||||
;; Note: we keep emacs state untouched in order to always have a
|
||||
;; fallback for modes that uses the `f' key (ie. magit-gitflow)
|
||||
(define-key evil-insert-state-map key
|
||||
`(lambda () (interactive)
|
||||
(let ((insertf (if (eq 'term-mode major-mode)
|
||||
|
@ -303,9 +306,6 @@ DELETE-FUNC when calling CALLBACK.
|
|||
(define-key evil-visual-state-map key
|
||||
`(lambda () (interactive)
|
||||
(spacemacs/escape-state ',seq ',shadowed nil nil 'evil-exit-visual-state)))
|
||||
(define-key evil-emacs-state-map key
|
||||
`(lambda () (interactive)
|
||||
(spacemacs/escape-state ',seq ',shadowed nil nil 'evil-normal-state)))
|
||||
(define-key evil-motion-state-map key
|
||||
`(lambda () (interactive)
|
||||
(spacemacs/escape-state ',seq ',shadowed nil nil 'evil-normal-state)))
|
||||
|
@ -1437,6 +1437,12 @@ DELETE-FUNC when calling CALLBACK.
|
|||
(magit-refresh))
|
||||
(define-key magit-status-mode-map (kbd "W") 'magit-toggle-whitespace))))
|
||||
|
||||
(defun spacemacs/init-magit-gitflow ()
|
||||
(use-package magit-gitflow
|
||||
:commands turn-on-magit-gitflow
|
||||
:init
|
||||
(add-hook 'magit-mode-hook 'turn-on-magit-gitflow)))
|
||||
|
||||
(defun spacemacs/init-markdown-mode ()
|
||||
(use-package markdown-mode
|
||||
:mode ("\\.md" . markdown-mode)))
|
||||
|
|
Reference in a new issue