Initiate helm micro-state with Shift-SPC instead of TAB
Related to #652
This commit is contained in:
parent
bbdf7888d2
commit
4da81eece1
|
@ -987,36 +987,33 @@ to read the [Helm documentation wiki][helm-doc].
|
|||
`Spacemacs` defines a [micro-state](#micro-states) for `Helm` to make it
|
||||
work like [Vim's Unit][] plugin.
|
||||
|
||||
Initiate the micro-state with <kbd>TAB</kbd> while in a `Helm` buffer. Use
|
||||
<kbd>TAB</kbd> again to exit from the micro-state (actually, like with any
|
||||
micro-state, pressing any key that is not bound to the micro-state key map
|
||||
will turn-off the micro-state).
|
||||
Initiate the micro-state with <kbd>Shift-SPC</kbd> while in a `Helm` buffer.
|
||||
Use <kbd>Shift-SPC</kbd> again to exit from the micro-state.
|
||||
|
||||
Key Binding | Description
|
||||
--------------------|------------------------------------------------------------
|
||||
<kbd>TAB</kbd> | initiate the micro-state
|
||||
<kbd>1</kbd> | execute action 0
|
||||
<kbd>2</kbd> | execute action 1
|
||||
<kbd>3</kbd> | execute action 2
|
||||
<kbd>4</kbd> | execute action 3
|
||||
<kbd>5</kbd> | execute action 4
|
||||
<kbd>6</kbd> | execute action 5
|
||||
<kbd>7</kbd> | execute action 6
|
||||
<kbd>8</kbd> | execute action 7
|
||||
<kbd>9</kbd> | execute action 8
|
||||
<kbd>0</kbd> | execute action 9
|
||||
<kbd>a</kbd> | switch to actions page
|
||||
<kbd>g</kbd> | go to first candidate
|
||||
<kbd>G</kbd> | go to last candidate
|
||||
<kbd>h</kbd> | go to previous source
|
||||
<kbd>j</kbd> | select next candidate
|
||||
<kbd>k</kbd> | select previous candidate
|
||||
<kbd>l</kbd> | go to next source
|
||||
<kbd>r</kbd> | switch to actions page and leave the micro-state (useful combined with <kbd>TAB</kbd>)
|
||||
<kbd>t</kbd> | mark current candidate
|
||||
<kbd>T</kbd> | mark all candidates
|
||||
<kbd>v</kbd> | execute persistent action
|
||||
Any other key | leave the micro-state
|
||||
Key Binding | Description
|
||||
----------------------|------------------------------------------------------------
|
||||
<kbd>Shift-SPC</kbd> | initiate or leave the micro-state
|
||||
<kbd>TAB</kbd> | switch to actions page and leave the micro-state
|
||||
<kbd>1</kbd> | execute action 0
|
||||
<kbd>2</kbd> | execute action 1
|
||||
<kbd>3</kbd> | execute action 2
|
||||
<kbd>4</kbd> | execute action 3
|
||||
<kbd>5</kbd> | execute action 4
|
||||
<kbd>6</kbd> | execute action 5
|
||||
<kbd>7</kbd> | execute action 6
|
||||
<kbd>8</kbd> | execute action 7
|
||||
<kbd>9</kbd> | execute action 8
|
||||
<kbd>0</kbd> | execute action 9
|
||||
<kbd>a</kbd> | switch to actions page
|
||||
<kbd>g</kbd> | go to first candidate
|
||||
<kbd>G</kbd> | go to last candidate
|
||||
<kbd>h</kbd> | go to previous source
|
||||
<kbd>j</kbd> | select next candidate
|
||||
<kbd>k</kbd> | select previous candidate
|
||||
<kbd>l</kbd> | go to next source
|
||||
<kbd>t</kbd> | mark current candidate
|
||||
<kbd>T</kbd> | mark all candidates
|
||||
<kbd>v</kbd> | execute persistent action
|
||||
|
||||
## Discovering
|
||||
|
||||
|
|
|
@ -1244,14 +1244,16 @@ which require an initialization must be listed explicitly in the list.")
|
|||
:background (face-attribute 'header-line :background)))
|
||||
|
||||
(spacemacs|define-micro-state helm-navigation
|
||||
:persistent t
|
||||
:doc (concat "[h] [j] [k] [l] select candidate "
|
||||
"[v] persistent action [a] action "
|
||||
"[t] select candidate")
|
||||
:on-enter (spacemacs//on-enter-helm-navigation-micro-state)
|
||||
:on-exit (spacemacs//on-exit-helm-navigation-micro-state)
|
||||
:bindings
|
||||
("<tab>" nil :exit t)
|
||||
("C-i" nil :exit t)
|
||||
("S-SPC" nil :exit t)
|
||||
("<tab>" helm-select-action :exit t)
|
||||
("C-i" helm-select-action :exit t)
|
||||
("?" helm-help)
|
||||
("a" helm-select-action)
|
||||
("g" helm-beginning-of-buffer)
|
||||
|
@ -1260,13 +1262,11 @@ which require an initialization must be listed explicitly in the list.")
|
|||
("j" helm-next-line)
|
||||
("k" helm-previous-line)
|
||||
("l" helm-next-source)
|
||||
("r" helm-select-action :exit t)
|
||||
("t" helm-toggle-visible-mark)
|
||||
("T" helm-toggle-all-marks)
|
||||
("v" helm-execute-persistent-action)))
|
||||
|
||||
(define-key helm-map (kbd "C-i") 'spacemacs/helm-navigation-micro-state)
|
||||
(define-key helm-map (kbd "<tab>") 'spacemacs/helm-navigation-micro-state)
|
||||
(define-key helm-map (kbd "S-SPC") 'spacemacs/helm-navigation-micro-state)
|
||||
|
||||
(eval-after-load "helm-mode" ; required
|
||||
'(spacemacs|hide-lighter helm-mode)))))
|
||||
|
|
Loading…
Reference in a new issue