From beab291332b0beaaa93b9e16d990be0c00aa8dc7 Mon Sep 17 00:00:00 2001 From: Hoyon Mak Date: Mon, 11 Feb 2019 14:06:36 +0000 Subject: [PATCH] Don't lazy load keybindings for evil surround --- CHANGELOG.develop | 1 + layers/+spacemacs/spacemacs-evil/packages.el | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 01f990126..4938c49df 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -912,6 +912,7 @@ Other: - Stopped configuring =fci-rule-color=, which was overriding themes that configured it (thanks to Victor Cuadrado Juan) - Added ranger-mode to golden-ratio-exclude-modes (thanks to Langston Barrett) + - Fixed evil surround bindings (thanks to Hoyon Mak) *** Layer changes and fixes **** Ansible - Improvements: diff --git a/layers/+spacemacs/spacemacs-evil/packages.el b/layers/+spacemacs/spacemacs-evil/packages.el index d653fc042..57978c165 100644 --- a/layers/+spacemacs/spacemacs-evil/packages.el +++ b/layers/+spacemacs/spacemacs-evil/packages.el @@ -298,6 +298,11 @@ :defer t :init (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 (lambda () (require 'evil-surround)) lazy-load-evil-surround) @@ -306,10 +311,6 @@ lazy-load-evil-surround-2)) :config (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)))) (defun spacemacs-evil/init-evil-terminal-cursor-changer ()