Don't lazy load keybindings for evil surround

This commit is contained in:
Hoyon Mak 2019-02-11 14:06:36 +00:00 committed by duianto
parent b1b483e4ae
commit beab291332
2 changed files with 6 additions and 4 deletions

View file

@ -912,6 +912,7 @@ Other:
- Stopped configuring =fci-rule-color=, which was overriding themes that - Stopped configuring =fci-rule-color=, which was overriding themes that
configured it (thanks to Victor Cuadrado Juan) configured it (thanks to Victor Cuadrado Juan)
- Added ranger-mode to golden-ratio-exclude-modes (thanks to Langston Barrett) - Added ranger-mode to golden-ratio-exclude-modes (thanks to Langston Barrett)
- Fixed evil surround bindings (thanks to Hoyon Mak)
*** Layer changes and fixes *** Layer changes and fixes
**** Ansible **** Ansible
- Improvements: - Improvements:

View file

@ -298,6 +298,11 @@
:defer t :defer t
:init :init
(progn (progn
;; `s' for surround instead of `substitute'
;; see motivation here:
;; https://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#the-vim-surround-case
(evil-define-key 'visual evil-surround-mode-map "s" 'evil-surround-region)
(evil-define-key 'visual evil-surround-mode-map "S" 'evil-substitute)
(spacemacs|add-transient-hook evil-visual-state-entry-hook (spacemacs|add-transient-hook evil-visual-state-entry-hook
(lambda () (require 'evil-surround)) (lambda () (require 'evil-surround))
lazy-load-evil-surround) lazy-load-evil-surround)
@ -306,10 +311,6 @@
lazy-load-evil-surround-2)) lazy-load-evil-surround-2))
:config :config
(progn (progn
;; `s' for surround instead of `substitute'
;; see motivation for this change in the documentation
(evil-define-key 'visual evil-surround-mode-map "s" 'evil-surround-region)
(evil-define-key 'visual evil-surround-mode-map "S" 'evil-substitute)
(global-evil-surround-mode 1)))) (global-evil-surround-mode 1))))
(defun spacemacs-evil/init-evil-terminal-cursor-changer () (defun spacemacs-evil/init-evil-terminal-cursor-changer ()