Move C-SPC on M-SPC and s-M-SPC for helm and ido micro-states

This commit is contained in:
syl20bnr 2015-04-22 22:44:51 -04:00
parent b0e82f9e22
commit c13c5b2470
3 changed files with 56 additions and 57 deletions

View file

@ -66,12 +66,13 @@ accessed via <kbd>,</kbd>.
#### Micro-state
Whenever possible a micro-state should be enabled with <kbd>C-SPC</kbd>.
For instance micro-states dedicated to special buffers like `helm` or `ido`
buffers are good candidates to be put on <kbd>C-SPC</kbd>.
Whenever possible a micro-state should be enabled with <kbd>M-SPC</kbd> and
<kbd>s-M-SPC</kbd>. We need the latter bindings on OS X since <kbd>M-SPC</kbd>
is used by the OS for spotlight.
**Important Note** Due to terminal limitation the micro-states _must_ also
be bound to <kbd>C-@</kbd>.
For instance micro-states dedicated to special buffers like `helm` or `ido`
buffers are good candidates to be put on <kbd>M-SPC</kbd> and
<kbd>s-M-SPC</kbd>.
It is recommended to add <kbd>q</kbd> to leave the micro-state.

View file

@ -1088,33 +1088,34 @@ makes sense to swap them. It's also recommended [here][tuhdo-tuto].
`Spacemacs` defines a [micro-state](#micro-states) for `Helm` to make it
work like [Vim's Unite][] plugin.
Initiate the micro-state with <kbd>C-SPC</kbd> while in a `Helm` buffer.
Use <kbd>C-SPC</kbd> again to exit from the micro-state.
Initiate the micro-state with <kbd>M-SPC</kbd> or <kbd>s-M-SPC</kbd>
while in a `Helm` buffer.
Key Binding | Description
----------------------|------------------------------------------------------------
<kbd>C-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
Key Binding | Description
---------------------------------------|------------------------------------------------------------
<kbd>M-SPC</kbd> or <kbd>s-M-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>q</kbd> | quit micro-state
<kbd>t</kbd> | mark current candidate
<kbd>T</kbd> | mark all candidates
<kbd>v</kbd> | execute persistent action
## Discovering
@ -1521,26 +1522,27 @@ Key Binding | Description
`Spacemacs` defines a [micro-state](#micro-states) for `ido`.
Initiate the micro-state with <kbd>C-SPC</kbd> while in a `ido` buffer.
Use <kbd>C-SPC</kbd> again to exit from the micro-state.
Initiate the micro-state with <kbd>M-SPC</kbd> or <kbd>s-M-SPC</kbd>
while in a `ido` buffer.
Key Binding | Description
----------------------|------------------------------------------------------------
<kbd>C-SPC</kbd> | initiate or leave the micro-state
<kbd>?</kbd> | display help
<kbd>e</kbd> | open dired
<kbd>h</kbd> | delete backward or parent directory
<kbd>j</kbd> | next match
<kbd>J</kbd> | sub directory
<kbd>k</kbd> | previous match
<kbd>K</kbd> | parent directory
<kbd>l</kbd> | select match
<kbd>n</kbd> | next directory in history
<kbd>o</kbd> | open in other window
<kbd>p</kbd> | previous directory in history
<kbd>s</kbd> | open in a new horizontal split
<kbd>t</kbd> | open in other frame
<kbd>v</kbd> | open in a new vertical split
Key Binding | Description
---------------------------------------|------------------------------------------------------------
<kbd>M-SPC</kbd> or <kbd>s-M-SPC</kbd> | initiate or leave the micro-state
<kbd>?</kbd> | display help
<kbd>e</kbd> | open dired
<kbd>h</kbd> | delete backward or parent directory
<kbd>j</kbd> | next match
<kbd>J</kbd> | sub directory
<kbd>k</kbd> | previous match
<kbd>K</kbd> | parent directory
<kbd>l</kbd> | select match
<kbd>n</kbd> | next directory in history
<kbd>o</kbd> | open in other window
<kbd>p</kbd> | previous directory in history
<kbd>q</kbd> | quit micro-state
<kbd>s</kbd> | open in a new horizontal split
<kbd>t</kbd> | open in other frame
<kbd>v</kbd> | open in a new vertical split
### NeoTree file tree

View file

@ -1499,12 +1499,10 @@ ARG non nil means that the editing style is `vim'."
(spacemacs|define-micro-state helm-navigation
:persistent t
:disable-evil-leader t
:define-key (helm-map . "C-SPC") (helm-map . "C-@")
:define-key (helm-map . "M-SPC") (helm-map . "s-M-SPC")
:on-enter (spacemacs//helm-navigation-ms-on-enter)
:on-exit (spacemacs//helm-navigation-ms-on-exit)
:bindings
("C-SPC" nil :exit t)
("C-@" nil :exit t)
("<tab>" helm-select-action :exit t)
("C-i" helm-select-action :exit t)
("<RET>" helm-maybe-exit-minibuffer :exit t)
@ -1789,8 +1787,8 @@ Put (global-hungry-delete-mode) in dotspacemacs/config to enable by default."
(define-key ido-completion-map (kbd "<left>") 'ido-delete-backward-updir)
(define-key ido-completion-map (kbd "<right>") 'ido-exit-minibuffer)
;; initiate micro-state
(define-key ido-completion-map (kbd "C-SPC") 'spacemacs/ido-navigation-micro-state)
(define-key ido-completion-map (kbd "C-@") 'spacemacs/ido-navigation-micro-state)
(define-key ido-completion-map (kbd "M-SPC") 'spacemacs/ido-navigation-micro-state)
(define-key ido-completion-map (kbd "s-M-SPC") 'spacemacs/ido-navigation-micro-state)
)
(add-hook 'ido-setup-hook 'spacemacs//ido-setup)
@ -1841,8 +1839,6 @@ Put (global-hungry-delete-mode) in dotspacemacs/config to enable by default."
:on-exit (spacemacs//ido-navigation-ms-on-exit)
:bindings
("?" nil :doc (spacemacs//ido-navigation-ms-full-doc))
("C-SPC" nil :exit t)
("C-@" nil :exit t)
("<RET>" ido-exit-minibuffer :exit t)
("<escape>" nil :exit t)
("e" ido-select-text :exit t)