Skip to content
seabadger edited this page Dec 1, 2017 · 5 revisions

How to do what C-w does in Isearch?

In Isearch, pressing C-w will insert the word-at-point into the minibuffer.

The same can be done in Ivy with M-j (ivy-yank-word) for any command, not just swiper.

On a related note, you can paste symbol-at-point into the search with M-n, which is a common case for using C-w in Isearch.

How to select the current input instead of the current candidate?

Use C-M-j (ivy-immediate-done). Helpful if you want to create a new file, but a file already exists that matches the desired name.

For people used to IDO/smex

How to prevent TAB from selecting the only candidate

(define-key ivy-minibuffer-map (kbd "TAB") 'ivy-partial)

How to prevent DEL, backspace from closing the minibuffer

(setq ivy-on-del-error-function nil)

Sorting commands by frequency

Install smex and your most frequent commands appear at the top which is a great convenience.

How to get more help?

  • You can press C-h m while in the minibuffer to get a short version of help on Ivy bindings.
  • You can read the (ivy) Info node.
  • You can browse the wiki. It’s also possible to clone the wiki via https://github.com/abo-abo/swiper.wiki.git and grep it.
  • You can browse the code.