]> code.delx.au - gnu-emacs-elpa/blob - packages/swiper/doc/Changelog.org
Merge commit '078f88ecb797b6cf2cd597417402274dd82402ce' from diff-hl
[gnu-emacs-elpa] / packages / swiper / 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 nil, 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]].