add perm. highlight and swoop/swiper to Symbol Highlight Transient State

This commit is contained in:
Adrian Staniec 2016-11-02 01:00:18 +01:00 committed by syl20bnr
parent 3ea4f49877
commit 29605f57eb
4 changed files with 14 additions and 5 deletions

View File

@ -46,11 +46,12 @@
;; add some functions to ahs transient states
(setq spacemacs--symbol-highlight-transient-state-doc
(concat spacemacs--symbol-highlight-transient-state-doc
" [_b_] search buffers [_/_] search proj [_f_] search files")
" [_b_] search buffers [_/_] search proj [_f_] search files [_s_] swoop")
spacemacs-symbol-highlight-transient-state-add-bindings
'(("/" spacemacs/helm-project-smart-do-search-region-or-symbol :exit t)
("b" spacemacs/helm-buffers-smart-do-search-region-or-symbol :exit t)
("f" spacemacs/helm-files-smart-do-search-region-or-symbol :exit t)))))
("f" spacemacs/helm-files-smart-do-search-region-or-symbol :exit t)
("s" spacemacs/helm-swoop-region-or-symbol :exit t)))))
(defun helm/post-init-bookmark ()
(spacemacs/set-leader-keys "fb" 'helm-filtered-bookmarks))

View File

@ -35,11 +35,12 @@
;; add some functions to ahs transient states
(setq spacemacs--symbol-highlight-transient-state-doc
(concat spacemacs--symbol-highlight-transient-state-doc
" [_b_] search buffers [_/_] search proj [_f_] search files")
" [_b_] search buffers [_/_] search proj [_f_] search files [_s_] swiper")
spacemacs-symbol-highlight-transient-state-add-bindings
'(("/" spacemacs/search-project-auto-region-or-symbol :exit t)
("b" spacemacs/swiper-all-region-or-symbol :exit t)
("f" spacemacs/search-auto-region-or-symbol :exit t)))))
("f" spacemacs/search-auto-region-or-symbol :exit t)
("s" spacemacs/swiper-region-or-symbol :exit t)))))
(defun ivy/init-counsel ()
(use-package counsel

View File

@ -170,6 +170,12 @@
(spacemacs//symbol-highlight-doc)
(make-string (length (spacemacs//symbol-highlight-doc)) 32))))
(defun spacemacs/symbol-highlight-permanent ()
"Highlight the symbol under point with `highlight-symbol-at-point'."
(interactive)
(highlight-symbol-at-point)
(spacemacs/ahs-highlight-now-wrapper))
;; golden ratio

View File

@ -74,7 +74,7 @@
ahs-inhibit-face-list nil
spacemacs--symbol-highlight-transient-state-doc
"
%s [_n_] next [_N_/_p_] previous [_r_] change range [_R_] reset [_e_] iedit
%s [_n_] next [_N_/_p_] previous [_r_] change range [_R_] reset [_e_] iedit [_h_] highlight
%s [_d_/_D_] next/previous definition")
;; since we are creating our own maps,
@ -136,6 +136,7 @@
("d" ahs-forward-definition)
("D" ahs-backward-definition)
("e" spacemacs/ahs-to-iedit :exit t)
("h" spacemacs/symbol-highlight-permanent)
("n" spacemacs/quick-ahs-forward)
("N" spacemacs/quick-ahs-backward)
("p" spacemacs/quick-ahs-backward)