Introduce key binding `sC` for `helm-swoop-clear-cache`

helm-swoop cannot detect the buffer has changed when calling git checkout to
change the file content, so helm-swoop won't clear the cache, we have to clear
the cache manually by evaluating `helm-swoop--clear-cache`. As it is
inconvenient, so I introduce a new key binding to to this.

Signed-off-by: Yang Qian <yang.qian@citrix.com>
This commit is contained in:
Yang Qian 2018-11-14 17:39:31 +08:00 committed by duianto
parent 989da8bb8f
commit ada180786e
2 changed files with 8 additions and 0 deletions

View File

@ -1472,6 +1472,7 @@ Other:
removed upstream.
- Load helm before read-file-name and completing-read
(thanks duianto and thanks Miciah for a more elegant solution)
- Added key binding `sC` for `helm-swoop-clear-cache` (thanks to Yang Qian)
**** HTML
- Added impatient-mode under ~SPC m i~ (thanks to geo7)
- Added =counsel-css= as an =ivy= alternative to =helm-css-scss=

View File

@ -370,8 +370,15 @@
(if thing thing ""))))))
(call-interactively 'helm-swoop)))
(defun spacemacs/helm-swoop-clear-cache ()
"Call `helm-swoop--clear-cache' to clear the cache"
(interactive)
(helm-swoop--clear-cache)
(message "helm-swoop cache cleaned."))
(spacemacs/set-leader-keys
"ss" 'helm-swoop
"sC" 'spacemacs/helm-swoop-clear-cache
"sS" 'spacemacs/helm-swoop-region-or-symbol
"s C-s" 'helm-multi-swoop-all)
(defadvice helm-swoop (before add-evil-jump activate)