Change ahs change range key to `r` instead of `c`

ahs = auto-highlight-symbol
This change was made to free `c` to clear persistent
highlighting of search with `<SPC> s c`
This commit is contained in:
syl20bnr 2014-11-04 22:07:32 -05:00
parent 3fb503c2b6
commit 6738eb3d81
2 changed files with 14 additions and 14 deletions

View File

@ -946,22 +946,22 @@ Key Binding | Description
`<SPC> s s` | initiate navigation micro-state
`<SPC> s n` | go to next occurrence and initiate navigation micro-state
`<SPC> s N` | go to previous occurrence and initiate navigation micro-state
`<SPC> s c b` | change range to `whole buffer`
`<SPC> s c d` | change range to `display area`
`<SPC> s c f` | change range to `function`
`<SPC> s C` | change range to default (`whole buffer`)
`<SPC> s r b` | change range to `whole buffer`
`<SPC> s r d` | change range to `display area`
`<SPC> s r f` | change range to `function`
`<SPC> s R` | change range to default (`whole buffer`)
In 'Spacemacs' highlight symbol micro-state:
Key Binding | Description
--------------|------------------------------------------------------------
`c` | change scope (`function`, `display area`, `whole buffer`)
`e` | edit occurrences
`n` | go to next occurrence
`N` | go to previous occurrence
`d` | go to next definition occurrence
`D` | go to previous definition occurrence
`r` | go to home occurrence (reset position to starting occurrence)
`r` | change range (`function`, `display area`, `whole buffer`)
`R` | go to home occurrence (reset position to starting occurrence)
Any other key | leave the navigation micro-state
The micro-state text in minibuffer display the following information:

View File

@ -696,14 +696,14 @@ DELETE-FUNC when calling CALLBACK.
'(ahs-inhibit-face-list nil))
(eval-after-load "evil-leader"
'(evil-leader/set-key
"sC" (lambda () (interactive) (eval '(ahs-change-range ahs-default-range) nil))
"scb" (lambda () (interactive) (eval '(ahs-change-range 'ahs-range-whole-buffer) nil))
"scd" (lambda () (interactive) (eval '(ahs-change-range 'ahs-range-display) nil))
"scf" (lambda () (interactive) (eval '(ahs-change-range 'ahs-range-beginning-of-defun) nil))
"se" 'ahs-edit-mode
"ss" (lambda () (interactive) (eval '(progn (ahs-highlight-now) (ahs-back-to-start)) nil))
"sn" (lambda () (interactive) (eval '(progn (ahs-highlight-now) (ahs-forward)) nil))
"sN" (lambda () (interactive) (eval '(progn (ahs-highlight-now) (ahs-backward)) nil))
"srb" (lambda () (interactive) (eval '(ahs-change-range 'ahs-range-whole-buffer) nil))
"srd" (lambda () (interactive) (eval '(ahs-change-range 'ahs-range-display) nil))
"srf" (lambda () (interactive) (eval '(ahs-change-range 'ahs-range-beginning-of-defun) nil))
"sR" (lambda () (interactive) (eval '(ahs-change-range ahs-default-range) nil))
"ts" 'auto-highlight-symbol-mode))
(spacemacs//hide-lighter auto-highlight-symbol-mode)
;; micro-state to easily jump from a highlighted symbol to the others
@ -723,14 +723,14 @@ DELETE-FUNC when calling CALLBACK.
(interactive)
(set-temporary-overlay-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "c") (lambda () (interactive)
(eval '(ahs-change-range) nil)))
(define-key map (kbd "d") 'ahs-forward-definition)
(define-key map (kbd "D") 'ahs-backward-definition)
(define-key map (kbd "e") 'ahs-edit-mode)
(define-key map (kbd "n") 'ahs-forward)
(define-key map (kbd "N") 'ahs-backward)
(define-key map (kbd "r") 'ahs-back-to-start)
(define-key map (kbd "R") 'ahs-back-to-start)
(define-key map (kbd "r") (lambda () (interactive)
(eval '(ahs-change-range) nil)))
map) nil)
(let* ((i 0)
(overlay-count (length ahs-overlay-list))
@ -752,7 +752,7 @@ DELETE-FUNC when calling CALLBACK.
(propx/y (propertize x/y 'face ahs-plugin-whole-buffer-face))
(hidden (if (< 0 (- overlay-count (nth 4 st))) "*" ""))
(prophidden (propertize hidden 'face '(:weight bold))))
(message "%s %s%s press (n) or (N) to navigate, (r) for reset, (c) to change scope"
(message "%s %s%s press (n) or (N) to navigate, (R) for reset, (r) to change range"
propplugin propx/y prophidden)))))))
(defun spacemacs/init-bookmark ()