]> code.delx.au - gnu-emacs-elpa/blob - packages/ivy/doc/Changelog.org
Merge commit 'db005182ad0fd05c07e8e5c085abe6c750e6c578' from ivy
[gnu-emacs-elpa] / packages / ivy / doc / Changelog.org
1 #+OPTIONS: toc:nil
2 * 0.6.0
3 ** Fixes
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]].
36 ** New Features
37 *** =ivy-mode=
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:
47 #+begin_src elisp
48 (setq ivy-re-builders-alist
49 '((t . ivy--regex-fuzzy)))
50 #+end_src
51 See [[https://github.com/abo-abo/swiper/pull/136][#136]].
52
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:
56
57 - input "the" matches both "the" and "The".
58 - input "The" matches only "The".
59
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:
63 #+begin_src elisp
64 (setq ivy-count-format "(%d/%d) ")
65 #+end_src
66 See [[https://github.com/abo-abo/swiper/pull/167][#167]].
67
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=:
71 #+begin_src elisp
72 (ivy-set-actions
73 'ivy-switch-buffer
74 '(("k"
75 (lambda (x)
76 (kill-buffer x)
77 (ivy--reset-state ivy-last))
78 "kill")
79 ("j"
80 ivy--switch-buffer-other-window-action
81 "other")))
82 #+end_src
83
84 After this:
85
86 - use ~M-o k~ to kill a buffer
87 - use ~M-o j~ to switch to a buffer in other window
88
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~.
91
92 See [[https://github.com/abo-abo/swiper/pull/164][#164]].
93
94
95
96
97
98
99
100
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
104 describe action.
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=.
115
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=
120 **** Add Async
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
124 *** =swiper=
125 **** Own history variable
126 Having own history variable allows to get more use of ~M-p~, ~M-n~ and ~C-r~.
127 *** =counsel-el=
128 **** Switch to action-style call
129 This allows to make use of ~C-M-n~ and ~C-M-p~.
130 *** =counsel-locate=
131 **** Add Async
132 **** Add extra actions
133 In addition to the default action of opening a file add:
134
135 - =xdg-open= action
136 - =dired= action
137
138 Press ~M-o~ or ~C-o~ to access these actions.
139 **** Add own history
140
141 *** API
142 **** Add :matcher
143 A matcher is a function that accepts a regexp and a list of candidates
144 and returns the filtered list of candidates.
145
146 The default matcher is basically =cl-remove-if-not= + =string-match=.
147 If you'd like to customize this, pass your own matcher.
148
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.
156
157 ** New Commands
158 *** =ivy-call=
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~.
161
162
163 *** =counsel-find-file=
164 Forward to =find-file= with Ivy completion.
165
166 =ivy-next-line-and-call= as well as =ivy-resume= should work for this command.
167
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.
170
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.
173
174 The variable =counsel-find-file-map= allows to customize the
175 minibuffer key bindings for this command.
176
177 Recommended binding:
178
179 #+begin_src elisp
180 (global-set-key (kbd "C-x C-f") 'counsel-find-file)
181 #+end_src
182
183 You can peek at files with ~C-M-n~ and ~C-M-p~.
184
185 See [[https://github.com/abo-abo/swiper/issues/122][#122]] and [[https://github.com/abo-abo/swiper/issues/123][#123]].
186
187 See [[https://github.com/abo-abo/swiper/pull/152][#152]] about ~M-n~, ~M-p~ and ~M-i~ switching directories when necessary.
188
189 *** =ivy-recentf=
190 Find a file on =recentf-list=.
191
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.
195
196 See [[https://github.com/abo-abo/swiper/issues/124][#124]].
197 *** =ivy-yank-word=
198 Add word at point to minibuffer input.
199
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
202 useful command.
203
204 See [[https://github.com/abo-abo/swiper/issues/125][#125]].
205 *** =counsel-M-x=
206 Forward to =execute-extended-command= with Ivy completion.
207 The candidate list will also display the key binding for each bound command.
208
209 This command will piggyback on =smex= for sorting, if =smex= is installed.
210
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.
215
216 See [[https://github.com/abo-abo/swiper/pull/136][#136]] and [[https://github.com/abo-abo/swiper/pull/138][#138]].
217
218 *** =hydra-ivy=
219 Press ~C-o~ to toggle the Hydra for Ivy.
220 It gives access to shorter bindings and many customizable options.
221
222 Use ~C-o >~ to grow the minibuffer.
223 Use ~C-o <~ to shrink the minibuffer.
224
225 See [[https://github.com/abo-abo/swiper/pull/151][#151]].
226
227 *** =ivy-toggle-calling=
228 Toggle executing the current action each time a new candidate is selected.
229
230 This command is bound to ~C-o c~.
231
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~.
233
234 *** =ivy-insert-current=
235 Inserts the current candidate into the minibuffer.
236
237 Press ~M-i~ if you want something close to the current candidate. You
238 can follow up with an edit and select.
239
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.
242
243 See [[https://github.com/abo-abo/swiper/pull/141][#141]].
244
245 *** =counsel-load-theme=
246 Forward to =load-theme= with Ivy completion. Allows to rapidly try themes (e.g. with ~C-M-n~).
247
248 *** =ivy-reverse-i-search=
249 Allow to recursively match history with ~C-r~.
250
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
254 candidates.
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~.
259
260 Some commands that support ~M-o~:
261
262 - =counsel-rhythmbox=
263 - =counsel-describe-function=
264 - =counsel-describe-variable=
265 - =ivy-switch-buffer=
266 - =counsel-locate=
267
268 *** =counsel-org-tag=
269 Forward to =org-set-tags= with Ivy completion.
270
271 Selecting any tag each time will toggle it on/off.
272 The current list of selected tags will be displayed in the prompt.
273
274 See [[https://github.com/abo-abo/swiper/pull/177][#177]] and [[https://github.com/abo-abo/swiper/pull/91][#91]].
275
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]].
279
280 *** =counsel-ag=
281 Interactively =ag= using Ivy completion.
282
283 *** =counsel-recoll=
284 Use =recoll= with Ivy completion.
285 See [[http://oremacs.com/2015/07/27/counsel-recoll/][Using Recoll desktop search database with Emacs]].
286
287 Install recoll with =sudo apt-get install recoll=.
288
289 *** =swiper-from-isearch=
290 Start =swiper= from the current =isearch= input.
291
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~.
295
296 See [[https://github.com/abo-abo/swiper/pull/183][#183]].
297
298 * 0.7.0
299 ** Fixes
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]].
338 ** New Features
339 *** =swiper=
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=, =vc-dir-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=
357 Bound to ~C-c C-f~.
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]].
365 **** Enable recursive =swiper= calls
366 While you =swiper= buffer-1, you can switch out of the minibuffer into
367 buffer-2 and call =swiper= again. Exiting the second minibuffer will
368 restore the first minibuffer.
369
370 To use this, you need to enable recursive minibuffers.
371 #+begin_src elisp
372 (setq enable-recursive-minibuffers t)
373 #+end_src
374
375 It's also useful to indicate the current depth:
376
377 #+begin_src elisp
378 (minibuffer-depth-indicate-mode 1)
379 #+end_src
380
381 See [[https://github.com/abo-abo/swiper/issues/309][#309]].
382 **** Fix for =twittering-mode=
383 The =field= text property is now removed before inserting text into
384 the minibuffer. This fixes the =swiper= problems with
385 =twittering-mode=. See [[https://github.com/abo-abo/swiper/issues/310][#310]].
386
387
388
389
390 *** =ivy=
391 **** Add manual
392 In the current state, the manual covers the most basic topics, like
393 the minibuffer key bindings and the regexp builders.
394 **** Make <left> and <right> behave as in fundamental-mode
395 **** Truncate minibuffer prompts longer than window-width
396 See [[https://github.com/abo-abo/swiper/issues/240][#240]].
397 **** ~C-M-n~ should not leave the minibuffer
398 Make sure that the minibuffer window remains selected as long as the
399 completion hasn't finished. For example, ~<f1> f~ to call
400 =counsel-describe-function=, input "forward" and spam ~C-M-n~ to read
401 the doc for each function that starts with "forward". The =*Help*=
402 window popup would move the window focus, but this change moves it
403 back to the minibuffer.
404 **** Add =flx= sorting
405 See [[https://github.com/abo-abo/swiper/issues/207][#207]].
406 Since flx is costly, move the caching to an earlier point. This means
407 immediate return for when the input hasn't changed, i.e. for ~C-n~ or
408 ~C-p~. When =flx= is installed, and =(eq ivy--regex-function 'ivy--regex-fuzzy)=
409 for current function (through =ivy-re-builders-alist=), then sort the final candidates with
410 =ivy--flx-sort=.
411
412 In the worst case, when some error pops up, return the same list. In
413 the best case sort the =cands= that all match =name= by closeness to
414 =name=.
415
416 How to use:
417 1. Have =flx= installed - =(require 'flx)= should succeed.
418 2. Configure =ivy-re-builders-alist= appropriately to use =ivy--regex-fuzzy=.
419
420 For example:
421
422 #+begin_src elisp
423 (setq ivy-re-builders-alist
424 '((t . ivy--regex-fuzzy)))
425 #+end_src
426 **** Support hash tables
427 Since =all-completions= also works for hash tables, no reason not to support them.
428 **** Improve documentation of =ivy-count-format=
429 Now possible to set it with Customize.
430 **** Add =ivy-index-functions-alist=
431 Customize this to decide how the index, i.e. the currently selected
432 candidate, is updated with new input.
433 For example, one strategy is not reset it to 0 after each change.
434
435 Another strategy, used for =swiper=, is to try to select the first
436 appropriate candidate after (inclusive) the first previously selected
437 candidate. This way, if you're typing something that matches what is
438 currently selected, the selection won't change.
439
440 See [[https://github.com/abo-abo/swiper/issues/253][#253]].
441 **** Add =ivy-virtual-abbreviate=
442 The mode of abbreviation for virtual buffer names.
443 **** Add =ivy-case-fold-search=
444 Used to override =case-fold-search=. See [[https://github.com/abo-abo/swiper/issues/259][#259]].
445 **** Add feedback for long-running async processes
446 Each time 0.5s pass after the last input, if the external process
447 hasn't finished yet, update minibuffer with the amount of candidates
448 collected so far. This is useful to see that long running commands
449 like =counsel-locate= or =counsel-ag= (when in a very large directory)
450 aren't stuck.
451 **** Promote =ivy-extra-directories= to defcustom
452 **** Promote =ivy-sort-function-alist= to defcustom
453 **** ~M-n~ should prefer url at point to symbol at point
454 **** ~C-x C-f M-n~ calls =ffap-url-fetcher= when at URL
455 **** Highlight modified file buffers with =ivy-modified-buffer= face
456 This new face is blank by default, but you can use e.g.:
457 #+begin_src elisp
458 (custom-set-faces
459 '(ivy-modified-buffer ((t (:background "#ff7777")))))
460 #+end_src
461 **** Work with =enable-recursive-minibuffers=
462 Store the old =ivy-last= in case =ivy-read= is called while inside the
463 minibuffer. Restore it after =ivy-call=.
464 **** Allow user-specified matched candidate sorting
465 New defcustom =ivy-sort-matches-functions-alist=.
466 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]].
467
468 By default, Ivy doesn't sort the matched candidates, they remain in
469 the same order as in the original collection. This option is the
470 default, since it's fast and simple.
471
472 A small problem with this approach is that we usually want prefix
473 matches to be displayed first. One solution to this is to input "^" to
474 see only the prefix matches.
475
476 Now, another solution is to can set:
477 #+begin_src elisp
478 (setq ivy-sort-matches-functions-alist
479 '((t . ivy--prefix-sort)))
480 #+end_src
481
482 Here's another example of using this defcustom:
483 #+begin_src elisp
484 (add-to-list
485 'ivy-sort-matches-functions-alist
486 '(read-file-name-internal . ivy--sort-files-by-date))
487 #+end_src
488
489 After this, during file name completion, most recently changed files
490 will be ahead.
491 **** =ivy-display-style=
492 Adds fancy highlighting to the minibuffer.
493 See [[https://github.com/abo-abo/swiper/issues/212][#212]], [[https://github.com/abo-abo/swiper/issues/217][#217]], .
494 *** =ivy-hydra=
495 **** Bind ~t~ to =toggle-truncate-lines=
496 See [[https://github.com/abo-abo/swiper/issues/214][#214]].
497 **** Bind ~a~ to =ivy-read-action=
498 *** =ivy-switch-buffer=
499 **** Make ~M-o r~ rename the buffer instead of switching.
500 See [[https://github.com/abo-abo/swiper/issues/233][#233]].
501 *** =counsel-locate=
502 **** Allow customizing locate options
503 See =counsel-locate-options=.
504 The current setting is:
505 #+begin_src elisp
506 (setq counsel-locate-options '("-i" "--regex"))
507 #+end_src
508 **** Support OSX
509 Use =open= instead of =xdg-open=. Modify =counsel-locate-options= for
510 OSX, since there =locate= doesn't support =--regex=.
511 **** Use single quotes for the regex
512 See [[https://github.com/abo-abo/swiper/issues/194][#194]].
513 **** Add initial-input argument
514 See [[https://github.com/abo-abo/swiper/issues/289][#289]].
515 *** =counsel-org-tag=
516 **** Now works in agenda
517 See [[https://github.com/abo-abo/swiper/issues/200][#200]].
518 *** =counsel-unicode-char=
519 **** Add own history
520 *** =counsel-M-x=
521 **** Add "definition" action
522 Use ~M-o d~ to jump to definition.
523 **** Show =current-prefix-arg= in the prompt
524 See [[https://github.com/abo-abo/swiper/issues/287][#287]].
525 *** =counsel-find-file=
526 **** Input '/sudo::' goes to current directory instead of root's home
527 See [[https://github.com/abo-abo/swiper/issues/283][#283]].
528 **** Fix directory validity check
529 See [[https://github.com/abo-abo/swiper/issues/283][#283]] [[https://github.com/abo-abo/swiper/issues/284][#284]].
530 **** Improve TRAMP support
531 Selecting items after ~//~ now works properly.
532 *** =counsel-git-grep=
533 **** Use prefix arg to specify the shell command.
534 Remember to use ~M-i~ to insert the current candidate into the
535 minibuffer.
536
537 See [[https://github.com/abo-abo/swiper/issues/244][#244]].
538 **** Allow =counsel-git-grep= -> =ivy-occur= -> =wgrep=
539 Using ~C-c C-o~ (=ivy-occur=) while in =counsel-git-grep= will produce
540 a =wgrep=-compatible buffer.
541 **** =ivy-occur= gives full candidates
542 This means that the =" | head -n 200"= speed-up isn't used and full
543 candidates are returned.
544 *** =counsel--find-symbol=
545 **** Allow to jump back with pop-tag-mark
546 Using ~C-.~ in:
547
548 - =counsel-describe-function=
549 - =counsel-describe-variable=
550 - =counsel-load-library=
551
552 will change the current buffer. The buffer and point can be restored
553 with ~M-*~ (=pop-tag-mark=).
554
555 I also recommend this binding:
556
557 #+begin_src elisp
558 (global-set-key (kbd "M-,") 'pop-tag-mark)
559 #+end_src
560 **** Resolve the name clash better
561 When the symbol is both bound and fbound, prefer the fbound one,
562 unless the =:caller= is =counsel-describe-variable=.
563 *** =counsel-ag=
564 **** Add =initial-directory=
565 Support alternative initial directory which helps other packages call
566 this function with their unique starting directory.
567 **** Fix on Windows
568 Using the "--vimgrep" argument improves things.
569 ** New Commands
570 *** =ivy-occur=
571 Bound to ~C-c C-o~. Store the current completion session to its own
572 buffer. You can have an unlimited amount of these buffers.
573 *** =ivy-avy=
574 Bound to ~C-'~.
575
576 Speeds up selecting a candidate that's currently visible in the minibuffer.
577 *** =ivy-kill-ring-save=
578 Bound to ~M-w~.
579
580 When the region is active, call =kill-ring-save=. Otherwise, store
581 all selected candidates to the kill ring.
582 *** =ivy-dispatching-call=
583 Bound to ~C-M-o~.
584
585 This is a non-exiting version of ~M-o~ (=ivy-dispatching-done=).
586 *** =ivy-read-action=
587 Bound to ~C-M-a~. Select the current action. Don't call it yet.
588 *** =swiper-multi=
589 Use =swiper= in multiple buffers.
590 See [[https://github.com/abo-abo/swiper/issues/182][#182]].
591
592 Basic usage tips for selecting multiple buffers:
593
594 - Use ~C-M-m~ (=ivy-call=) to add or remove one more buffer without exiting.
595 - Use ~C-m~ (=ivy-done=) to add one last buffer.
596 - Or use ~C-M-j~ (=ivy-immediate-done=) to finish without adding more buffers.
597 - Hold ~C-M-n~ (=ivy-next-line-and-call=) to add a lot of buffers at once.
598 *** =swiper-mc=
599 Open multiple cursors at all selected candidates.
600 *** =swiper-all=
601 New command to launch =swiper= for all open file buffers. Note that
602 this can be excruciatingly slow if you don't clean up your buffer list
603 often.
604 *** =counsel-grep=
605 This is essentially =swiper= for huge files. It's not as smooth as
606 =swiper= for small files, but has a faster startup and faster matching
607 for files that measure in megabytes.
608 *** =counsel-git-grep-query-replace=
609 Bound to ~M-q~. Perform =query-replace= on all matches in all buffers.
610 *** =counsel-jedi=
611 Complete Python symbols using Jedi.
612 *** =counsel-cl=
613 Complete Common Lisp symbols using SLIME.
614 *** =counsel-yank-pop=
615 Give completion for inserting from the kill ring.
616 See =counsel-yank-pop-truncate= defcustom and [[https://github.com/abo-abo/swiper/issues/218][#218]].
617
618 * 0.8.0
619 ** Package rename
620 Due to popular demand, =swiper-0.7.0= is succeeded by =ivy-0.8.0= in GNU
621 ELPA. The contents of the package don't change, only the name. Make
622 sure to remove the =~/.emacs.d/elpa/swiper-0.7.0= directory if you
623 have it and ~M-x~ =package-install ivy=.
624 ** Documentation
625 HTML documentation is available at http://oremacs.com/swiper/.
626
627 Texinfo documentation is in doc/ivy.texi.
628
629 The HTML file shouldn't be in this repository to avoid bloat, instead
630 it's in the gh-pages branch at
631 https://github.com/abo-abo/swiper/tree/gh-pages.
632 ** Fixes
633 *** ivy-read
634 **** Fix recursive minibuffer exit with ~C-g~
635 Make it so e.g. ~C-h f C-h v C-g~ goes back to the =describe-function= selection.
636 **** Ensure the return result
637 In some cases, =read-from-minibuffer= will return the whole minibuffer
638 contents (i.e. all available candidates). Return =ivy--current= instead.
639 **** Properly support matching ignoring order
640 See [[https://github.com/abo-abo/swiper/issues/296][#296]] and [[https://github.com/abo-abo/swiper/issues/329][#329]].
641 **** Insert intermediate candidates during async completions
642 See [[https://github.com/abo-abo/swiper/issues/340][#340]].
643 **** Initialize =ivy-last= to empty state
644 See [[https://github.com/abo-abo/swiper/issues/352][#352]].
645 **** Fix extra actions for =completing-read=
646 See [[https://github.com/abo-abo/swiper/issues/337][#337]].
647 **** Support a list of symbols as collection
648 See [[https://github.com/abo-abo/swiper/issues/375][#375]].
649 **** Define =setq-local= and =defvar-local= unless defined
650 With this commit, Ivy works on emacs-24.2.
651 See [[https://github.com/abo-abo/swiper/issues/415][#415]].
652 **** Make ~M-o~ not modify the action
653 See [[https://github.com/abo-abo/swiper/issues/454][#454]].
654 **** Make sure user keybindings are respected
655 See [[https://github.com/abo-abo/swiper/issues/466][#466]].
656 **** Fix =read-file-name= with a specified dir
657 See [[https://github.com/abo-abo/swiper/issues/475][#475]].
658 **** Don't highlight the match in the file part
659 See [[https://github.com/abo-abo/swiper/issues/483][#483]].
660 **** Add a few tests for alists
661 *** ivy-occur
662 **** Fix =default-directory=
663 This way, =next-error= etc will work properly.
664 *** ivy--resize-minibuffer-to-fit
665 **** Fix for small delta
666 See [[https://github.com/abo-abo/swiper/issues/339][#339]].
667 **** Check =frame-root-window-p=
668 See [[https://github.com/abo-abo/swiper/issues/380][#380]].
669 *** ivy-completing-read
670 **** Use =completing-read-default= for tmm
671 See [[https://github.com/abo-abo/swiper/issues/316][#316]].
672 *** ivy--regex-plus
673 **** Recognize ! at the beginning of the str
674 See [[https://github.com/abo-abo/swiper/issues/318][#318]].
675 **** Prettify a bit
676 See [[https://github.com/abo-abo/swiper/issues/344][#344]].
677 **** Don't consider =\\(?...\)= a group
678 See [[https://github.com/abo-abo/swiper/issues/393][#393]].
679 *** ivy--get-window
680 **** Always return a valid window
681 Even if =state= is invalid.
682 *** ivy--recompute-index
683 **** Update =cl-position= logic
684 See [[https://github.com/abo-abo/swiper/issues/207][#207]].
685 *** ivy-reverse-i-search
686 **** Fix due to recursive update
687 See [[https://github.com/abo-abo/swiper/issues/323][#323]].
688 *** ivy--reset-state
689 **** Don't null =initial-input=
690 This is specifically for ='read-file-name-internal= collection. The
691 input needs to be set to nil for e.g. =rgrep=, which supplies the
692 *absolute* path as =initial-input=, resulting in a mess.
693
694 For now, don't set input to nil if =:action= was passed to =ivy-read=.
695 See [[https://github.com/abo-abo/swiper/issues/336][#336]].
696 **** Don't deactivate region
697 See [[https://github.com/abo-abo/swiper/issues/377][#377]].
698 *** ivy-completion-in-region
699 **** Use =completion-all-completions=
700 See [[https://github.com/abo-abo/swiper/issues/341][#341]].
701 **** Optimize for 1 candidate
702 When there's only one candidate, call the action immediately.
703 **** Add feedback for 1 candidate
704 When the sole completion is the same as the input, notify the user.
705 See [[https://github.com/abo-abo/swiper/issues/350][#350]].
706 **** Bind =completion-ignore-case=
707 It's convenient to have it the same value as =case-fold-search=.
708 *** ivy-read-action
709 **** Give enough minibuffer space
710 See [[https://github.com/abo-abo/swiper/issues/402][#402]].
711 **** Allow to customize the action hint formatter
712 See [[https://github.com/abo-abo/swiper/issues/469][#469]].
713 *** ivy-count-format
714 **** Fix for nil value
715 See [[https://github.com/abo-abo/swiper/issues/349][#349]].
716 *** ivy-switch-buffer
717 **** Don't fall back to =switch-to-buffer=
718 See [[https://github.com/abo-abo/swiper/issues/410][#410]].
719 *** ivy-next-history-element
720 **** No "\\_<" for dynamic-collection
721 "\\_<" regex is Emacs-specific and should only be done if
722 =:dynamic-collection= is nil. It is nil for =counsel-git-grep= with
723 repositories < 20000 lines, but non-nil for larger ones.
724
725 Fixes [[https://github.com/abo-abo/swiper/issues/409][#409]].
726 *** ivy-occur-press
727 **** Pulse no longer
728 Repeated pulses within a short time span resulted in horrible window
729 flickering.
730 *** ivy-resume
731 **** Add a guard against null =:action=
732 *** ivy-avy
733 **** Make ~C-g~ cancel gracefully
734 See abo-abo/avy[[https://github.com/abo-abo/swiper/issues/140][#140]].
735 *** ivy-dispatching-done
736 Allow to exit with no candidates.
737 *** swiper
738 **** Improve for multiple occurrences on one line
739 See [[https://github.com/abo-abo/swiper/issues/314][#314]].
740 **** Fix "backward" search
741 When none of the previous candidates after the point match the current
742 input, instead of returning 0, return the index of the last matching
743 candidate. This is a good choice, because that candidate is the
744 closest to the point of the initial search start.
745
746 See [[https://github.com/abo-abo/swiper/issues/319][#319]].
747 **** Return point
748 See [[https://github.com/abo-abo/swiper/issues/370][#370]].
749 **** Update =regexp-search-ring=
750 See [[https://github.com/abo-abo/swiper/issues/89][#89]].
751 **** Always remove '(field) text property
752 Allows to search better in modes for shell interaction.
753 *** swiper-font-lock-ensure
754 **** Add modes
755 Add bongo-library-mode, bongo-playlist-mode, sauron-mode.
756
757 See [[https://github.com/abo-abo/swiper/issues/19][#19]].
758 **** Don't fail when font-lock is off
759 See [[https://github.com/abo-abo/swiper/issues/400][#400]].
760 *** swiper--multi-candidates
761 **** Add check for =make-string=
762 See [[https://github.com/abo-abo/swiper/issues/481][#481]].
763 *** counsel--async-sentinel
764 **** Fix issue with =ivy--regex-ignore-order=
765 See [[https://github.com/abo-abo/swiper/issues/342][#342]].
766 **** Re-display when no cands
767 **** Recognize error codes other than 1
768 See [[https://github.com/abo-abo/swiper/issues/394][#394]].
769 *** consel-git
770 **** Fix window selection.
771 Use =with-ivy-window=, so that each new file chosen with e.g. ~C-M-n~ is
772 selected in the same window.
773 *** counsel-recoll
774 **** Add =:unwind=
775 See [[https://github.com/abo-abo/swiper/issues/403][#403]].
776 *** compilation warnings
777 See [[https://github.com/abo-abo/swiper/issues/324][#324]].
778 ** New Features
779 *** ivy-read
780 **** Use =flx= for highlighting fuzzy matches
781 See [[https://github.com/abo-abo/swiper/issues/207][#207]].
782 **** Simplify the signature for =:dynamic-collection= functions
783 When given =:dynamic-collection=, assume the collection function only
784 needs one argument - the string input.
785 **** Modify ~M-n~ prediction when region is active
786 When the region is active and ~M-n~ is called, insert the region
787 contents into the minibuffer and deactivate the region. The region
788 deactivation is done for =swiper=, to make it easier to search for
789 multiple words or a subword.
790 **** Allow to compose collections
791 ***** Example 1: async collection
792 Stack =recentf= on top of =counsel-locate=:
793
794 #+begin_src elisp
795 (defun small-test ()
796 (cl-subseq recentf-list 0 10))
797
798 (ivy-set-sources
799 'counsel-locate
800 '((small-test)
801 (original-source)))
802 #+end_src
803
804 Here, (original-source) represents the async candidates of
805 =counsel-locate=. All extra sources are static - each function is called
806 once to generate a list of strings, which will be filtered later.
807
808 The order matters, so you can have e.g.:
809
810 #+begin_src elisp
811 (ivy-set-sources
812 'counsel-locate
813 '((original-source)
814 (small-test)))
815 #+end_src
816
817 See [[https://github.com/abo-abo/swiper/issues/373][#373]].
818 ***** Example 2: sync collection
819 #+begin_src elisp
820 (defun my-extra-source ()
821 (append
822 (when (eq 'Git (vc-backend (buffer-file-name)))
823 (list "git1" "git2" "git3"))
824 (when (file-exists-p "doc/Changelog.org")
825 (list (propertize "doc/Changelog.org" 'face '(:background "red"))))))
826
827 (defun my-find-file ()
828 (interactive)
829 (ivy-read "Find file: " 'read-file-name-internal
830 :action (lambda (x)
831 (with-ivy-window
832 (find-file (expand-file-name x ivy--directory))))
833 :require-match 'confirm-after-completion
834 :history 'file-name-history
835 :caller 'my-find-file))
836
837 (ivy-set-sources
838 'my-find-file
839 '((my-extra-source)
840 (original-source)))
841 #+end_src
842
843 The function =my-find-file= knows nothing about the extra source, it's
844 only purpose is to introduce a =:caller= to attach things to, as to not
845 to mess up e.g. =counsel-find-file=.
846
847 The function =my-extra-source= gets called once in =ivy-read= via
848 =ivy--reset-state=. It takes no args and returns a list of strings,
849 possibly empty.
850 **** Improve documentation UI
851 Bind ~C-h m~ to =ivy-help=.
852
853 =ivy-help-file= is a new defvar pointing to the ivy-help.org file.
854
855 Bind ~D~ in =hydra-ivy= to go to hydra's definition.
856
857 See [[https://github.com/abo-abo/swiper/issues/376][#376]] and [[https://github.com/abo-abo/swiper/issues/379][#379]].
858 **** Add ignore pattern toggling
859 ~C-c C-a~ is bound to =ivy-toggle-ignore= - a new command to toggle ignore
860 patterns (user-configured filtering). If the ignore patterns are
861 enabled and there are zero candidates after ignoring, display the ones
862 that match the current text. This feature currently works for
863 =ivy-switch-buffer= and =counsel-find-file=.
864
865 See [[https://github.com/abo-abo/swiper/issues/369][#369]].
866 *** ivy-mode
867 **** Set =completion-in-region-function=
868 See [[https://github.com/abo-abo/swiper/issues/331][#331]].
869 **** Improve ~M-n~ for ='read-file-name-internal=
870 *** ivy-set-occur
871 Allows to customize =ivy-occur= per-command.
872 **** =ivy-switch-buffer=
873 Add custom occur.
874 See [[https://github.com/abo-abo/swiper/issues/438][#438]] and [[https://github.com/abo-abo/swiper/issues/440][#440]].
875 *** ivy-occur-mode
876 **** New commands on ~j~, ~k~, ~c~
877 (ivy-occur-toggle-calling): New command bound to ~c~.
878 (ivy-occur-next-line): New command bound to ~j~.
879 (ivy-occur-previous-line): New command bound to ~k~.
880
881 This makes =ivy-occur= much more convenient, instead of ~gjgjgjg~, just
882 ~cjjj~. Especially good for commands that change the contents of the
883 other window, like =describe-function= or =counsel-git-grep=.
884
885 Example:
886
887 - ~C-h f~ (=describe-funtion=)
888 - =run= (=self-insert-command=)
889 - ~C-c C-o~ (=ivy-occur=); ~C-o u~ also works.
890 - ~cjjjjkkkk~
891 **** New command =ivy-occur-revert-buffer= on ~g~
892 Does what e.g. =revert-buffer= does for *Help* buffers.
893
894 Has special handling for =counsel-git-grep=, =counsel-ag= and
895 =counsel-grep=: will run the shell command once more and reflect the
896 updates in files.
897
898 Move =ivy-occur-press= from ~g~ to ~f~.
899 **** Improve the feedback for ~j~ and ~k~
900 The overlays will be more responsive now.
901 *** ivy-re-builders-alist
902 **** Allow =this-command= to be a key
903 Example:
904 #+begin_src elisp
905 (defun asdf ()
906 (interactive)
907 (completing-read "prompt: " '("abc" "abcd" "def")))
908
909 (global-set-key (kbd "C-c t") 'asdf)
910
911 (setq ivy-re-builders-alist
912 '(
913 (asdf . ivy--regex-fuzzy)
914 (t . ivy--regex-plus)))
915 #+end_src
916 This is useful for commands that you didn't write. For new commands
917 that you write, consider using =ivy-read= and =:caller=.
918
919 See [[https://github.com/abo-abo/swiper/issues/330][#330]].
920 *** ivy-set-actions
921 **** Call with =t= to affect all commands
922 Example:
923
924 #+begin_src elisp
925 (ivy-set-actions
926 t
927 '(("i" insert "insert")))
928 #+end_src
929
930 Now an "insert" action will be available for all =ivy-read= sessions
931 when pressing ~M-o~.
932
933 See [[https://github.com/abo-abo/swiper/issues/337][#337]].
934 *** ivy-faces
935 New defcustom group.
936 See [[https://github.com/abo-abo/swiper/issues/389][#389]].
937 *** ivy-flx-limit
938 New variable. Configure when =flx= is used.
939 See [[https://github.com/abo-abo/swiper/issues/207][#207]].
940 *** ivy-ignore-buffers
941 New defcustom. See [[https://github.com/abo-abo/swiper/issues/366][#366]].
942 *** ivy-inhibit-action
943 New variable. See [[https://github.com/abo-abo/swiper/issues/363][#363]].
944 *** ivy-do-completion-in-region
945 New defcustom. See [[https://github.com/abo-abo/swiper/issues/367][#367]].
946 *** ivy-fixed-height-minibuffer
947 New defcustom.
948
949 When non nil, fix the height of the minibuffer during ivy completion
950 at =ivy-height=. This effectively sets the minimum height at this level
951 and tries to ensure that it does not change depending on the number of
952 candidates.
953
954 See [[https://github.com/abo-abo/swiper/issues/353][#353]].
955 *** ivy-set-display-transformer
956 New API function.
957
958 Now used by =switch-to-buffer= and =read-file-name=.
959
960 See [[https://github.com/abo-abo/swiper/issues/399][#399]].
961 *** ivy-ignore-buffers
962 New defcustom similar to =ido-ignore-buffers=.
963
964 See [[https://github.com/abo-abo/swiper/issues/382][#382]].
965 *** ivy-add-newline-after-prompt
966 New defcustom.
967
968 See [[https://github.com/abo-abo/swiper/issues/451][#451]].
969 *** ivy-switch-buffer
970 **** Add virtual views
971 =ivy-views= variable stores pre-defined views. Allows to set a window
972 configuration with many buffers from =ivy-switch-buffer=.
973
974 How to use: just set =ivy-views= appropriately. An example value is
975 provided (but nulled, so that it's empty initially).
976 *** ivy-use-ignore-default
977 New defcustom
978
979 See [[https://github.com/abo-abo/swiper/issues/477][#477]].
980 *** swiper
981 **** Improve =swiper-query-replace=
982 To replace a symbol with a similar symbol,
983
984 1. Press ~C-s M-n~ for =swiper= and select the symbol at point as input.
985 2. Press ~M-q~ for =swiper-query-replace=
986 3. Press ~M-n~ to yank the symbol to replace.
987 4. Edit the replacement and ~RET~.
988
989 Here step-3 was modified to yank e.g. "symbol" instead of
990 "\_<symbol\_>" previously.
991
992 *** swiper-font-lock-exclude
993 New variable for major modes that misbehave with =font-lock-ensure=.
994 See [[https://github.com/abo-abo/swiper/issues/346][#346]].
995 *** swiper-all
996 **** New auto-updates position
997 See [[https://github.com/abo-abo/swiper/issues/401][#401]].
998 *** counsel-mode
999 A minor-mode that remaps built-in functions that have counsel
1000 replacements available.
1001
1002 See [[https://github.com/abo-abo/swiper/issues/414][#414]].
1003 **** Allow use of describe-prefix-bindings
1004 See [[https://github.com/abo-abo/swiper/issues/441][#441]].
1005 *** counsel-find-file
1006 **** Add =initial-input=
1007 See [[https://github.com/abo-abo/swiper/issues/336][#336]].
1008 **** Change tramp prompt from "Find File: " to "user@host: "
1009 **** Bind =counsel-up-directory= to ~C-DEL~
1010 New function that moves up to the parent directory and at the same
1011 time preselects the current directory. This is useful for moving up
1012 and down a file tree quickly.
1013
1014 See [[https://github.com/abo-abo/swiper/issues/343][#343]].
1015 **** Customize =M-n= action
1016 This feature allows to quickly visit Github issues from either
1017 =magit-commit-mode= or from a version-controlled file. The point has to
1018 be at the "#" char in e.g. "[[https://github.com/abo-abo/swiper/issues/123][#123]]", that represents an issue.
1019
1020 It's possible to customize =ivy-ffap-url-functions= to do a similar
1021 thing for places other than Github.
1022
1023 The ~C-x C-f M-n~ key binding will work better with =counsel-find-file=,
1024 for plain =find-file= it will open a =dired= buffer in addition to opening
1025 the URL.
1026 **** Can un-ignore dotfiles with a leading dot input
1027 When =ivy-text= starts with a dot, don't use
1028 =counsel-find-file-ignore-regexp=. The generic way to do this is with
1029 ~C-c C-a~ (=ivy-toggle-ignore=), but this is faster and more convenient.
1030
1031 See [[https://github.com/abo-abo/swiper/issues/408][#408]].
1032 **** Bind ~M-o f~ to =find-file-other-window=
1033 **** Correctly expand file name at point
1034 See [[https://github.com/abo-abo/swiper/issues/430][#430]].
1035 **** Add display transformer
1036 See [[https://github.com/abo-abo/swiper/issues/458][#458]].
1037 **** Add magic slash that changes the directory
1038 Update to the behavior: the slash ("/") will enter a directory even if
1039 its name isn't completely typed out if either:
1040
1041 1. It's the only candidate.
1042 2. The candidate index isn't 0, i.e. "C-n" has been typed at least once.
1043 3. The input isn't "/".
1044
1045 The above rules still allow to keep the old behavior with "//" moving
1046 to root and "/ssh:" opening tramp.
1047
1048 This is an experimental feature, please report if it breaks someone's
1049 workflow.
1050
1051 See [[https://github.com/abo-abo/swiper/issues/321][#321]] and [[https://github.com/abo-abo/swiper/issues/480][#480]].
1052 *** counsel-git-grep
1053 **** Bind ~C-c C-m~ to =counsel-git-grep-switch-cmd=
1054 The initial command always runs on all files.
1055
1056 To run only on *.el files, ~C-c C-m~ followed by ~M-i~ =-- *.el=.
1057 To run on *.c and *.h files, ~C-c C-m~ followed by ~M-i~ =-- *.c *.h=.
1058 To switch to all files again, ~C-c C-m~ and select the appropriate
1059 entry.
1060
1061 See [[https://github.com/abo-abo/swiper/issues/420][#420]].
1062 *** counsel-locate
1063 **** counsel-locate-cmd
1064 New defcustom that replaces =counsel-locate-options=.
1065
1066 See [[https://github.com/abo-abo/swiper/issues/385][#385]].
1067 **** counsel-locate-cmd-mdfind
1068 New function.
1069 See [[https://github.com/abo-abo/swiper/issues/390][#390]].
1070 **** counsel-locate-cmd-es
1071 New function.
1072 See [[https://github.com/abo-abo/swiper/issues/426][#426]].
1073 *** counsel-yank-pop
1074 **** Truncate during display
1075 During the completion, only the context around the match will be shown.
1076 By default, the context is +2 lines above and +2 lines below the match.
1077 It can be adjusted with =counsel-yank-pop-truncate-radius=.
1078 Additionally, =ivy-height= is temporarily bound to 5 during completion.
1079 This way, the maximum minibuffer height should be 1+4*5=21 lines.
1080
1081 See [[https://github.com/abo-abo/swiper/issues/315][#315]].
1082 *** counsel-unicode-char
1083 Display hex codes in left column.
1084 *** counsel-rhythmbox
1085 **** Preselect the current song
1086 *** counsel-ag
1087 **** =counsel-ag-base-command=
1088 Allows the command run by =counsel-ag-function= to be customized. There
1089 are several reasons to allow this: The vimgrep option is a recent
1090 addition; on windows it's more convenient to use pt; and the user
1091 might want to customize ignored files.
1092
1093 Standard value:
1094 #+begin_src elisp
1095 (setq counsel-ag-base-command "ag --nocolor --nogroup %s -- .")
1096 #+end_src
1097
1098 See [[https://github.com/abo-abo/swiper/issues/335][#335]].
1099 **** Add dir prompt for ~C-u~
1100 See [[https://github.com/abo-abo/swiper/issues/429][#429]].
1101 **** Add =counsel-ag-map=
1102 See [[https://github.com/abo-abo/swiper/issues/462][#462]].
1103 *** counsel-async-split-string-re
1104 New defcustom.
1105 *** counsel--async-cmd
1106 **** Add optional exit-code table
1107 This argument can be used to associate exit codes with the underlying
1108 reason. Used in counsel-ag-function to signal that an exit code of 1
1109 means that no matches were found.
1110
1111 See [[https://github.com/abo-abo/swiper/issues/421][#421]].
1112 *** counsel-prompt-function
1113 New defcustom
1114
1115 See [[https://github.com/abo-abo/swiper/issues/424][#424]] and [[https://github.com/abo-abo/swiper/issues/425][#425]].
1116 *** counsel-grep
1117 **** Reveal outlines
1118 Just like =swiper=.
1119 **** Should pick candidates closest to point
1120 Fixes the algorithm selecting the first matching candidate in case
1121 there are 0 matching candidates following point. Now the last matching
1122 candidate will be selected, resulting in less scrolling.
1123 **** Speed up x40 times
1124 The default shell command will not use =--ignore-case= switch for
1125 =grep=. It's a bit less convenient, but results in a huge speed-up.
1126 *** counsel-M-x
1127 **** Add help action
1128 Bound to ~M-o h~ by default.
1129
1130 See [[https://github.com/abo-abo/swiper/issues/452][#452]].
1131 ** New Commands
1132 *** =counsel-tmm=
1133 Completion for the menu bar items. For example:
1134
1135 =counsel-tmm= -> =Options= -> =Set Default Font...=.
1136
1137 Thanks to completion, the latter stages of the chain would look like: =op= ~RET~ =set= ~RET~.
1138 *** =counsel-imenu=
1139 Jump to a buffer position indexed by imenu.
1140 *** =counsel-decbinds=
1141 Show a list of all defined keys, and their definitions. Describe the
1142 selected candidate.
1143 See [[https://github.com/abo-abo/swiper/issues/332][#332]].
1144 *** =counsel-list-processes=
1145 Offer completion for =process-list=
1146
1147 The default action deletes the selected process. An extra action
1148 allows to switch to the process buffer.
1149
1150 See [[https://github.com/abo-abo/swiper/issues/357][#357]] and [[https://github.com/abo-abo/swiper/issues/398][#398]].
1151 *** =ivy-switch-buffer-other-window=
1152 Remap =switch-to-buffer-other-window= to =ivy-switch-buffer-other-window= for =ivy-mode=.
1153
1154 See [[https://github.com/abo-abo/swiper/issues/361][#361]].
1155 *** =counsel-git-stash=
1156 Search through all available git stashes.
1157
1158 See [[https://github.com/abo-abo/swiper/issues/374][#374]].
1159 *** =counsel-git-log=
1160 Call the =git log --grep= shell command and search through the output.
1161 *** =counsel-pt=
1162 Grep for a string in the current directory using pt.
1163
1164 See [[https://github.com/abo-abo/swiper/issues/434][#434]].
1165 *** =counsel-linux-app=
1166 Launch a Linux desktop application, similar to Alt-<F2>.
1167
1168 See [[https://github.com/abo-abo/swiper/issues/446][#446]].
1169 *** =counsel-ace-link=
1170 Ivy completion for =ace-link=.
1171 *** =counsel-esh-history=
1172 Browse Eshell history.
1173
1174 See [[https://github.com/abo-abo/swiper/issues/459][#459]].
1175 *** =counsel-shell-history=
1176 Browse shell history.
1177 *** =counsel-grep-or-swiper=
1178 New command: automatically use =swiper= for smaller buffers and
1179 =counsel-grep= for larger buffers.
1180
1181 Adjust with:
1182 #+begin_src elisp
1183 (setq counsel-grep-swiper-limit 300000)
1184 #+end_src
1185
1186 By default, the splitting predicate is 300K bytes in a file.