spacemacs/layers/+completion/ivy
syl20bnr dc58801c7d core: refactor shadow mechanism
Shadowing is now control by layer property ':can-shadow' only.
can-shadow is a commutative relation, if layer1 can shadow layer2 then layer2
can shadow layer1.
the shadow operator is a binary operator accepting two layer names, it is not
commutative and the order of the operands is determined by the order of the
layers in the dotfile (like the ownership stealing mechanism).

If ':can-shadow' is set explicity to nil in the dotfile then the layer won't
shadow any layer.
For instance to install both ivy and helm layer:

   (setq dotspacemacs-configuration-layers
   '(
     ivy
     (helm :can-shadow nil)
     )

note that due to the commutative relation the above example can also be
written (in this case, ':can-shadow' should be read ':can-be-shawdowed'):

   (setq dotspacemacs-configuration-layers
   '(
     (ivy :can-shadow nil)
     helm
     )
2017-09-25 23:07:22 -04:00
..
local/ivy-spacemacs-help
config.el counsel-find-file: Bind `find-file-other-window' to "j" 2017-07-07 12:32:21 +02:00
funcs.el counsel: rename git dir variable 2017-09-10 19:54:33 +03:00
layers.el core: refactor shadow mechanism 2017-09-25 23:07:22 -04:00
packages.el set ivy-use-selectable-prompt to t 2017-08-01 16:51:19 +03:00
README.org set ivy-use-selectable-prompt to t 2017-08-01 16:51:19 +03:00

Ivy layer

Description

This layer enables Ivy for completion. It will replace the default completion by Helm.

These completion systems are the central control towers of Spacemacs, they are used to manage buffers, projects, search results, configuration layers, toggles and more…

Mastering your choice of completion system will make you a Spacemacs power user.

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add ivy to the existing dotspacemacs-configuration-layers list in this file.

Configuration

You can customize ivy with the following variables:

  • ivy-wrap Whether C-n and C-p should wrap-around when at the the first or last candidate. The default value is nil.
  • ivy-extra-directories Setting this to nil hides . and .. directories from file name completion. You can still go up a directory up by DEL. The default value is ("../", "./").
  • ivy-use-virtual-buffers Add bookmarks and recent files to buffer completion menu. The Spacemacs default is t.
  • ivy-height The height of the minibuffer. The Spacemacs default is 15.
  • ivy-use-selectable-prompt When non-nil, make the prompt line selectable like a candidate. The Spacemacs default value is t.

Key Bindings

If you choose ivy as completion system, make sure to read the official manual. In case you don't want to read everything, at least familiarise with minibuffer key bindings.

Some useful key bindings are presented in the following table.

Key Binding Description
RET call default action on current candidate
M-RET the same as RET but doesn't close completion minibuffer
C-M-j use current input immediately (this can be used to create a new file in Find File)
tab complete partially
M-o show the list of valid actions on current candidate (then press any of described keys to execute it)
C-M-o the same as M-o but doesn't close completion minibuffer
C-' use avy to quickly select completion on current page (sometimes faster than using arrows)
<ESC> close minibuffer

Transient state

Press M-SPC anytime in Ivy to get into the transient state.

Key Binding Description
j select next candidate
k select previous candidate
d call default action on candidate
g the same as d but doesn't close completion minibuffer
o leave transient state