4 *** =swiper-avy= should use only the current window
5 Not all windows. See [[https://github.com/abo-abo/swiper/issues/117][#117]].
6 *** fix wrap-around for =ivy-next-line=
7 See [[https://github.com/abo-abo/swiper/issues/118][#118]].
8 *** =swiper-avy= should do nothing for empty input
9 See [[https://github.com/abo-abo/avy/issues/50][#50]].
10 *** =ivy-alt-done= should require TRAMP if necessary
11 See [[https://github.com/abo-abo/swiper/pull/145][#145]].
12 *** =swiper-query-replace= shouldn't miss the first occurrence
13 See [[https://github.com/abo-abo/swiper/pull/144][#144]].
14 *** =swiper= should not deactivate mark
15 *** =ivy-mode= should not switch to TRAMP for certain input
16 See [[https://github.com/abo-abo/swiper/pull/145][#145]].
17 *** =counsel-find-file= should work better with TRAMP
18 "/ssh:foo" should not be cut off
19 See [[https://github.com/abo-abo/swiper/pull/145][#145]].
20 *** =counsel-find-file= supports Windows drive letters
21 See [[https://github.com/abo-abo/swiper/pull/155][#155]].
22 *** =counsel-file-file= should work better with files that contain "~"
23 See [[https://github.com/abo-abo/swiper/pull/157][#157]].
24 *** =counsel-M-x= should respect =ivy-format-function=
25 See [[https://github.com/abo-abo/swiper/pull/150][#150]].
26 *** =counsel-git-grep= should position better on exit
27 See [[https://github.com/abo-abo/swiper/pull/153][#153]].
28 *** =ivy-mode= should re-scale text to minibuffer height
29 See [[https://github.com/abo-abo/swiper/pull/151][#151]].
30 *** =counsel-unicode-char= should use action-style call
31 See [[https://github.com/abo-abo/swiper/pull/160][#160]].
32 *** =ivy-read= should allow % in prompt string
33 See [[https://github.com/abo-abo/swiper/pull/171][#171]].
34 *** =ivy-call= should execute in proper window
35 See [[https://github.com/abo-abo/swiper/pull/176][#176]].
38 **** Open an Info file on the file system
39 When in =Info-mode=, press ~g~ and select either "(./)" or "(../)" to
40 switch to file name completion. That file will be opened with Info.
41 **** Account for =minibuffer-depth-indication-mode=
42 If you have =minibuffer-depth-indication-mode= on, the minibuffer
43 prompt will indicate the current depth.
44 See [[https://github.com/abo-abo/swiper/pull/134][#134]].
45 **** Add fuzzy matching function
46 To enable fuzzy matching, set your =ivy-re-builders-alist= accordingly:
48 (setq ivy-re-builders-alist
49 '((t . ivy--regex-fuzzy)))
51 See [[https://github.com/abo-abo/swiper/pull/136][#136]].
53 See also [[https://github.com/abo-abo/swiper/pull/142][#142]] for toggling fuzzy matching with ~C-o m~.
54 **** =case-fold-search= optimization
55 Bind case-fold-search to t when the input is all lower-case:
57 - input "the" matches both "the" and "The".
58 - input "The" matches only "The".
60 See [[https://github.com/abo-abo/swiper/pull/166][#166]].
61 **** Allow to see the candidate index a la =anzu= via =ivy-count-format=
62 To have this feature, use something like this:
64 (setq ivy-count-format "(%d/%d) ")
66 See [[https://github.com/abo-abo/swiper/pull/167][#167]].
68 You can also set this to "", if you don't want any count, see [[https://github.com/abo-abo/swiper/pull/188][#188]].
69 **** Allow to add additional exit points for any command
70 Example for =ivy-switch-to-buffer=:
77 (ivy--reset-state ivy-last))
80 ivy--switch-buffer-other-window-action
86 - use ~M-o k~ to kill a buffer
87 - use ~M-o j~ to switch to a buffer in other window
89 You can always use ~M-o o~ to access the default action. When there is
90 only one action, ~M-o~ does the same as ~C-m~.
92 See [[https://github.com/abo-abo/swiper/pull/164][#164]].
101 *** =counsel-describe-function= and =counsel-decribe-variable=
102 **** Add a binding to look up the symbol in info
103 Press ~C-,~ to look up the symbol in info, instead of the default
105 See [[https://github.com/abo-abo/swiper/pull/121][#121]].
106 **** Handle symbol-at-point better in non-Elisp buffers
107 See [[https://github.com/abo-abo/swiper/pull/126][#126]].
108 *** =ivy-switch-buffer=
109 **** New face =ivy-virtual=
110 See [[https://github.com/abo-abo/swiper/pull/129][#129]].
111 **** Deal better with invisible buffers
112 See [[https://github.com/abo-abo/swiper/pull/135][#135]].
113 **** Add custom keymap
114 You can customize =ivy-switch-buffer-map=.
116 See [[https://github.com/abo-abo/swiper/pull/164][#164]].
117 **** Add extra actions
118 Add a =kill-buffer= action, and =switch-to-buffer-other-window= action.
119 *** =counsel-git-grep=
121 Make it fully async: the process =git grep= will be killed and
122 restarted on new input. This results in almost no keyboard delay.
123 **** Own history variable
125 **** Own history variable
126 Having own history variable allows to get more use of ~M-p~, ~M-n~ and ~C-r~.
128 **** Switch to action-style call
129 This allows to make use of ~C-M-n~ and ~C-M-p~.
132 **** Add extra actions
133 In addition to the default action of opening a file add:
138 Press ~M-o~ or ~C-o~ to access these actions.
143 A matcher is a function that accepts a regexp and a list of candidates
144 and returns the filtered list of candidates.
146 The default matcher is basically =cl-remove-if-not= + =string-match=.
147 If you'd like to customize this, pass your own matcher.
149 See =counsel-git-grep-matcher= for an example.
150 **** Allow to customize the initial input for all commands
151 Customize =ivy-initial-inputs-alist= for this.
152 See [[https://github.com/abo-abo/swiper/pull/140][#140]].
153 **** =ivy-sort-functions-alist= should also examine =this-command=
154 **** :dynamic-collection is now a boolean
155 Pass the collection function as the second var instead.
159 Execute the current action for the current candidate without exiting
160 the minibuffer. Bound to ~C-M-m~ or ~M-RET~ or ~C-o g~.
163 *** =counsel-find-file=
164 Forward to =find-file= with Ivy completion.
166 =ivy-next-line-and-call= as well as =ivy-resume= should work for this command.
168 The variable =counsel-find-file-ignore-regexp= allows to ignore
169 certain files, like dot files. Input a leading dot to see all files.
171 The variable =counsel-find-file-at-point= allows to automatically use
172 =ffap=. You also can do it manually with ~M-n~ when the point is on a file name.
174 The variable =counsel-find-file-map= allows to customize the
175 minibuffer key bindings for this command.
180 (global-set-key (kbd "C-x C-f") 'counsel-find-file)
183 You can peek at files with ~C-M-n~ and ~C-M-p~.
185 See [[https://github.com/abo-abo/swiper/issues/122][#122]] and [[https://github.com/abo-abo/swiper/issues/123][#123]].
187 See [[https://github.com/abo-abo/swiper/pull/152][#152]] about ~M-n~, ~M-p~ and ~M-i~ switching directories when necessary.
190 Find a file on =recentf-list=.
192 Note that if your set =ivy-use-virtual-buffers=, =recentf-list= is
193 merged into candidates list for =ivy-switch-buffer=. But if you want
194 it separately, you can use this command.
196 See [[https://github.com/abo-abo/swiper/issues/124][#124]].
198 Add word at point to minibuffer input.
200 This is similar to what ~C-w~ does for =isearch=. However it's bound
201 to ~M-j~ instead of ~C-w~, since ~C-w~ is bound to =kill-region= - a
204 See [[https://github.com/abo-abo/swiper/issues/125][#125]].
206 Forward to =execute-extended-command= with Ivy completion.
207 The candidate list will also display the key binding for each bound command.
209 This command will piggyback on =smex= for sorting, if =smex= is installed.
211 Use =counsel-M-x-initial-input= to customize the initial input for
212 this command. By default, it's "^" - the regex character that
213 indicates beginning of string. This results in much faster matching,
214 since you usually type the command name from the start.
216 See [[https://github.com/abo-abo/swiper/pull/136][#136]] and [[https://github.com/abo-abo/swiper/pull/138][#138]].
219 Press ~C-o~ to toggle the Hydra for Ivy.
220 It gives access to shorter bindings and many customizable options.
222 Use ~C-o >~ to grow the minibuffer.
223 Use ~C-o <~ to shrink the minibuffer.
225 See [[https://github.com/abo-abo/swiper/pull/151][#151]].
227 *** =ivy-toggle-calling=
228 Toggle executing the current action each time a new candidate is selected.
230 This command is bound to ~C-o c~.
232 To explain how this is useful: ~C-M-m C-M-f C-M-f C-M-f~ is equivalent to ~C-o cjjj~.
234 *** =ivy-insert-current=
235 Inserts the current candidate into the minibuffer.
237 Press ~M-i~ if you want something close to the current candidate. You
238 can follow up with an edit and select.
240 I find this very useful when creating new files with a similar name to
241 the existing file: ~C-x C-f M-i~ + a bit of editing is very fast.
243 See [[https://github.com/abo-abo/swiper/pull/141][#141]].
245 *** =counsel-load-theme=
246 Forward to =load-theme= with Ivy completion. Allows to rapidly try themes (e.g. with ~C-M-n~).
248 *** =ivy-reverse-i-search=
249 Allow to recursively match history with ~C-r~.
251 I like this command from bash shell. The usual way to search through
252 history is with ~M-p~ and ~M-n~. Using =ivy-reverse-i-search= will
253 open a recursive completion session with the current history as the
255 *** =counsel-rhythmbox=
256 [[http://oremacs.com/2015/07/09/counsel-rhythmbox/][Control Rhythmbox from Emacs.]]
257 *** =ivy-dispatching-done=
258 Select an action for the current candidate and execute it. Bound to ~M-o~.
260 Some commands that support ~M-o~:
262 - =counsel-rhythmbox=
263 - =counsel-describe-function=
264 - =counsel-describe-variable=
265 - =ivy-switch-buffer=
268 *** =counsel-org-tag=
269 Forward to =org-set-tags= with Ivy completion.
271 Selecting any tag each time will toggle it on/off.
272 The current list of selected tags will be displayed in the prompt.
274 See [[https://github.com/abo-abo/swiper/pull/177][#177]] and [[https://github.com/abo-abo/swiper/pull/91][#91]].
276 *** =counsel-org-tag-agenda=
277 Forward to =org-agenda-set-tags= with Ivy completion.
278 See [[https://github.com/abo-abo/swiper/pull/177][#177]].
281 Interactively =ag= using Ivy completion.
284 Use =recoll= with Ivy completion.
285 See [[http://oremacs.com/2015/07/27/counsel-recoll/][Using Recoll desktop search database with Emacs]].
287 Install recoll with =sudo apt-get install recoll=.
289 *** =swiper-from-isearch=
290 Start =swiper= from the current =isearch= input.
292 *** =ivy-immediate-done=
293 Use this command to exit the minibuffer choosing not the current
294 candidate, but the current text. Bound to ~C-M-j~ or ~C-u C-j~.
296 See [[https://github.com/abo-abo/swiper/pull/183][#183]].
300 *** Fix :dynamic-collection not being sorted
301 *** When :initial-input contains a plus, escape it
302 See [[https://github.com/abo-abo/swiper/issues/195][#195]].
303 *** Set line-spacing to 0 in the minibuffer
304 See [[https://github.com/abo-abo/swiper/issues/198][#198]].
305 *** Enlarge the minibuffer window if the candidate list doesn't fit
306 See [[https://github.com/abo-abo/swiper/issues/198][#198]] and [[https://github.com/abo-abo/swiper/issues/161][#161]] and [[https://github.com/abo-abo/swiper/issues/220][#220]].
307 *** Fix minibuffer collapsing to one line
308 See [[https://github.com/abo-abo/swiper/issues/237][#237]], [[https://github.com/abo-abo/swiper/issues/229][#229]] and [[https://github.com/abo-abo/swiper/issues/77][#77]].
309 *** Use minibuffer-allow-text-properties
310 Allows =ivy-read= to return a propertized string.
311 *** Improve ~C-g~ out of a long-running async process
312 Use =counsel-delete-process= as =:unwind=.
313 *** Don't regexp-quote :preselect
314 See [[https://github.com/abo-abo/swiper/issues/245][#245]].
315 *** Fix ivy-partial for fuzzy completion
316 See [[https://github.com/abo-abo/swiper/issues/266][#266]].
317 *** ivy-resume should pass :caller
318 See [[https://github.com/abo-abo/swiper/issues/245][#245]].
319 *** Fix the regression in perfect match logic
320 See [[https://github.com/abo-abo/swiper/issues/270][#270]].
321 *** Fix pasting file paths on Windows
322 *** ~C-j~ should no stop completion for a pasted file path
323 *** ~C-M-j~ should use =ivy--directory=
324 When completing file names, expand the file name properly.
325 See [[https://github.com/abo-abo/swiper/issues/275][#275]].
326 *** Use a specific blend method for dark themes
327 See [[https://github.com/abo-abo/swiper/issues/278][#278]].
328 *** Fix one-off bug in =ivy-scroll-up-command= and =ivy-scroll-down-command=
329 *** ~M-o~ shouldn't set the action permanently
330 So now it's possible to e.g. =counsel-describe-function= -> ~M-o d~ ->
331 =ivy-resume= -> ~M-o o~ -> =ivy-resume= -> ~M-o i~.
332 *** Fix swiper preselect issue with similar or identical lines
333 See [[https://github.com/abo-abo/swiper/issues/290][#290]].
334 *** Make ivy-completing-read handle history as cons
335 See [[https://github.com/abo-abo/swiper/issues/295][#295]].
336 *** Perform string-match in the original buffer
337 The syntax for whitespace, separators etc. is different for modes. See [[https://github.com/abo-abo/swiper/issues/298][#298]].
340 **** Make line numbers into display properties
341 Each candidate is now a single space plus the original string. The
342 display property of the single space holds the line number. This means
343 that it's no longer possible to match line numbers in queries, which
344 is a good thing if you're searching for numbers.
345 **** Extend =swiper-font-lock-ensure=
346 Add =mu4e-view-mode=, =mu4e-headers-mode=, =help-mode=,
347 =elfeed-show-mode=, =emms-stream-mode=, =debbugs-gnu-mode=,
348 =occur-mode=, =occur-edit-mode=, =bongo-mode=, =eww-mode=.
349 **** Add support for =evil-jumper/backward=
350 See [[https://github.com/abo-abo/swiper/issues/268][#268]].
351 **** Make compatible with =visual-line-mode=
352 =swiper= will split the lines when =visual-line-mode= is on. This is
353 convenient for small buffers. For large buffers, it can be very slow,
354 since =visual-line-mode= is slow.
355 See [[https://github.com/abo-abo/swiper/issues/227][#227]].
356 **** Add =swiper-toggle-face-matching=
358 At each start of =swiper=, the face at point will be stored.
359 Use this command to toggle matching only the candidates with that face.
360 See [[https://github.com/abo-abo/swiper/issues/288][#288]].
361 **** =push-mark= only if exited the minibuffer
362 ~C-M-n~ and ~C-M-p~ will no longer push mark and annoy with messages.
363 **** =ivy-resume= should restore the buffer for =swiper=
364 See [[https://github.com/abo-abo/swiper/issues/302][#302]].
367 In the current state, the manual covers the most basic topics, like
368 the minibuffer key bindings and the regexp builders.
369 **** Make <left> and <right> behave as in fundamental-mode
370 **** Truncate minibuffer prompts longer than window-width
371 See [[https://github.com/abo-abo/swiper/issues/240][#240]].
372 **** ~C-M-n~ should not leave the minibuffer
373 Make sure that the minibuffer window remains selected as long as the
374 completion hasn't finished. For example, ~<f1> f~ to call
375 =counsel-describe-function=, input "forward" and spam ~C-M-n~ to read
376 the doc for each function that starts with "forward". The =*Help*=
377 window popup would move the window focus, but this change moves it
378 back to the minibuffer.
379 **** Add =flx= sorting
380 See [[https://github.com/abo-abo/swiper/issues/207][#207]].
381 Since flx is costly, move the caching to an earlier point. This means
382 immediate return for when the input hasn't changed, i.e. for ~C-n~ or
383 ~C-p~. When =flx= is installed, and =(eq ivy--regex-function 'ivy--regex-fuzzy)=
384 for current function (through =ivy-re-builders-alist=), then sort the final candidates with
387 In the worst case, when some error pops up, return the same list. In
388 the best case sort the =cands= that all match =name= by closeness to
392 1. Have =flx= installed - =(require 'flx)= should succeed.
393 2. Configure =ivy-re-builders-alist= appropriately to use =ivy--regex-fuzzy=.
398 (setq ivy-re-builders-alist
399 '((t . ivy--regex-fuzzy)))
401 **** Support hash tables
402 Since =all-completions= also works for hash tables, no reason not to support them.
403 **** Improve documentation of =ivy-count-format=
404 Now possible to set it with Customize.
405 **** Add =ivy-index-functions-alist=
406 Customize this to decide how the index, i.e. the currently selected
407 candidate, is updated with new input.
408 For example, one strategy is not reset it to 0 after each change.
410 Another strategy, used for =swiper=, is to try to select the first
411 appropriate candidate after (inclusive) the first previously selected
412 candidate. This way, if you're typing something that matches what is
413 currently selected, the selection won't change.
415 See [[https://github.com/abo-abo/swiper/issues/253][#253]].
416 **** Add =ivy-virtual-abbreviate=
417 The mode of abbreviation for virtual buffer names.
418 **** Add =ivy-case-fold-search=
419 Used to override =case-fold-search=. See [[https://github.com/abo-abo/swiper/issues/259][#259]].
420 **** Add feedback for long-running async processes
421 Each time 0.5s pass after the last input, if the external process
422 hasn't finished yet, update minibuffer with the amount of candidates
423 collected so far. This is useful to see that long running commands
424 like =counsel-locate= or =counsel-ag= (when in a very large directory)
426 **** Promote =ivy-extra-directories= to defcustom
427 **** Promote =ivy-sort-function-alist= to defcustom
428 **** ~M-n~ should prefer url at point to symbol at point
429 **** ~C-x C-f M-n~ calls =ffap-url-fetcher= when at URL
430 **** Highlight modified file buffers with =ivy-modified-buffer= face
431 This new face is blank by default, but you can use e.g.:
434 '(ivy-modified-buffer ((t (:background "#ff7777")))))
436 **** Work with =enable-recursive-minibuffers=
437 Store the old =ivy-last= in case =ivy-read= is called while inside the
438 minibuffer. Restore it after =ivy-call=.
439 **** Allow user-specified matched candidate sorting
440 New defcustom =ivy-sort-matches-functions-alist=.
441 See [[https://github.com/abo-abo/swiper/issues/269][#269]] [[https://github.com/abo-abo/swiper/issues/265][#265]] [[https://github.com/abo-abo/swiper/issues/213][#213]].
443 By default, Ivy doesn't sort the matched candidates, they remain in
444 the same order as in the original collection. This option is the
445 default, since it's fast and simple.
447 A small problem with this approach is that we usually want prefix
448 matches to be displayed first. One solution to this is to input "^" to
449 see only the prefix matches.
451 Now, another solution is to can set:
453 (setq ivy-sort-matches-functions-alist
454 '((t . ivy--prefix-sort)))
457 Here's another example of using this defcustom:
460 'ivy-sort-matches-functions-alist
461 '(read-file-name-internal . ivy--sort-files-by-date))
464 After this, during file name completion, most recently changed files
466 **** =ivy-display-style=
467 Adds fancy highlighting to the minibuffer.
468 See [[https://github.com/abo-abo/swiper/issues/212][#212]], [[https://github.com/abo-abo/swiper/issues/217][#217]], .
470 **** Bind ~t~ to =toggle-truncate-lines=
471 See [[https://github.com/abo-abo/swiper/issues/214][#214]].
472 **** Bind ~a~ to =ivy-read-action=
473 *** =ivy-switch-buffer=
474 **** Make ~M-o r~ rename the buffer instead of switching.
475 See [[https://github.com/abo-abo/swiper/issues/233][#233]].
477 **** Allow customizing locate options
478 See =counsel-locate-options=.
479 The current setting is:
481 (setq counsel-locate-options '("-i" "--regex"))
484 Use =open= instead of =xdg-open=. Modify =counsel-locate-options= for
485 OSX, since there =locate= doesn't support =--regex=.
486 **** Use single quotes for the regex
487 See [[https://github.com/abo-abo/swiper/issues/194][#194]].
488 **** Add initial-input argument
489 See [[https://github.com/abo-abo/swiper/issues/289][#289]].
490 *** =counsel-org-tag=
491 **** Now works in agenda
492 See [[https://github.com/abo-abo/swiper/issues/200][#200]].
493 *** =counsel-unicode-char=
496 **** Add "definition" action
497 Use ~M-o d~ to jump to definition.
498 **** Show =current-prefix-arg= in the prompt
499 See [[https://github.com/abo-abo/swiper/issues/287][#287]].
500 *** =counsel-find-file=
501 **** Input '/sudo::' goes to current directory instead of root's home
502 See [[https://github.com/abo-abo/swiper/issues/283][#283]].
503 **** Fix directory validity check
504 See [[https://github.com/abo-abo/swiper/issues/283][#283]] [[https://github.com/abo-abo/swiper/issues/284][#284]].
505 **** Improve TRAMP support
506 Selecting items after ~//~ now works properly.
507 *** =counsel-git-grep=
508 **** Use prefix arg to specify the shell command.
509 Remember to use ~M-i~ to insert the current candidate into the
512 See [[https://github.com/abo-abo/swiper/issues/244][#244]].
513 **** Allow =counsel-git-grep= -> =ivy-occur= -> =wgrep=
514 Using ~C-c C-o~ (=ivy-occur=) while in =counsel-git-grep= will produce
515 a =wgrep=-compatible buffer.
516 **** =ivy-occur= gives full candidates
517 This means that the =" | head -n 200"= speed-up isn't used and full
518 candidates are returned.
519 *** =counsel--find-symbol=
520 **** Allow to jump back with pop-tag-mark
523 - =counsel-describe-function=
524 - =counsel-describe-variable=
525 - =counsel-load-library=
527 will change the current buffer. The buffer and point can be restored
528 with ~M-*~ (=pop-tag-mark=).
530 I also recommend this binding:
533 (global-set-key (kbd "M-,") 'pop-tag-mark)
535 **** Resolve the name clash better
536 When the symbol is both bound and fbound, prefer the fbound one,
537 unless the =:caller= is =counsel-describe-variable=.
539 **** Add =initial-directory=
540 Support alternative initial directory which helps other packages call
541 this function with their unique starting directory.
543 Using the "--vimgrep" argument improves things.
546 Bound to ~C-c C-o~. Store the current completion session to its own
547 buffer. You can have an unlimited amount of these buffers.
551 Speeds up selecting a candidate that's currently visible in the minibuffer.
552 *** =ivy-kill-ring-save=
555 When the region is active, call =kill-ring-save=. Otherwise, store
556 all selected candidates to the kill ring.
557 *** =ivy-dispatching-call=
560 This is a non-exiting version of ~M-o~ (=ivy-dispatching-done=).
561 *** =ivy-read-action=
562 Bound to ~C-M-a~. Select the current action. Don't call it yet.
564 Use =swiper= in multiple buffers.
565 See [[https://github.com/abo-abo/swiper/issues/182][#182]].
567 Basic usage tips for selecting multiple buffers:
569 - Use ~C-M-m~ (=ivy-call=) to add or remove one more buffer without exiting.
570 - Use ~C-m~ (=ivy-done=) to add one last buffer.
571 - Or use ~C-M-j~ (=ivy-immediate-done=) to finish without adding more buffers.
572 - Hold ~C-M-n~ (=ivy-next-line-and-call=) to add a lot of buffers at once.
574 Open multiple cursors at all selected candidates.
576 New command to launch =swiper= for all open file buffers. Note that
577 this can be excruciatingly slow if you don't clean up your buffer list
580 This is essentially =swiper= for huge files. It's not as smooth as
581 =swiper= for small files, but has a faster startup and faster matching
582 for files that measure in megabytes.
583 *** =counsel-git-grep-query-replace=
584 Bound to ~M-q~. Perform =query-replace= on all matches in all buffers.
586 Complete Python symbols using Jedi.
588 Complete Common Lisp symbols using SLIME.
589 *** =counsel-yank-pop=
590 Give completion for inserting from the kill ring.
591 See =counsel-yank-pop-truncate= defcustom and [[https://github.com/abo-abo/swiper/issues/218][#218]].