Thanks to this blogpost, I found a solution. The real tool that I was looking for was wgrep which does the multi-editing heavy lifting that I was missing. Here are the steps for using the Silver Searcher backend:
After you've found the search results, run C-c C-o (ivy-occur)
Toggle the edit flag of the buffer to enter wgrep mode: hit C-x C-...
I found a solution to what I was trying to do:
(defun my-swiper-isearch-again ()
"Start swiper-isearch with the last thing searched for."
(swiper-isearch (car swiper-history)))
(global-set-key (kbd "s-g") 'my-swiper-isearch-again)
Now when I press "s-g" the previous swiper search starts again from the point of the current cursor and ...
You can set it after counsel is loaded with:
(setq ivy-initial-inputs-alist nil))
See (elisp) Hooks for Loading.
You can achieve the same thing with use-package as follows:
(setq ivy-initial-inputs-alist nil))
I would suggest using ivy-prescient. It is a package that provides sorting and filtering for ivy.
After installing it, you enable it with ivy-prescient-mode.
For more details on it's usage see its usage README section.
Is there a way to do this in a more natural fashion?
The best way I know is to type ~ twice: the first time will restart completion from your remote home directory, and the second from your local home directory.
Quoth (ivy) Using TRAMP:
Move to the local root directory.
Move to the local home directory.
I have code which uses completing-read to do this
Ivy's analogue to completing-read is the function ivy-read, whose operation is described in its docstring and the Ivy User Manual under (info "(ivy) API").
Given a list of (point-number . title-text), how can ivy be used to show this in a list in ivy?
Here's an example of how to achieve this:
In default Ivy configurations, C-x C-f is bound to counsel-find-file which will invoke ivy-completing-read even if global ivy-mode is turned off!
Rather than going through the clumsy steps of disabling Ivy, calling the non-Counsel find-file, then turning Ivy back on, I have implemented this solution.
In the given use case of many files, you can enter a ...
What I would want is a function or a package that could display all opened projectile projects with ivy or helm and let me choose a candidate. When the candidate would be selected, the last buffer opened in that project would be opened. It would be basically a counsel-switch-buffer but with projects. If possible the last visited project would display first.
I suspect the reason for this is:
Calling counsel-switch-buffer is triggering a window configuration change.
window-configuration-change-hook contains window--adjust-process-windows to "Update process window sizes to match the current window configuration", which calls set-process-window-size for each process in each affected window, which talks ...
I think you are looking for something like ivy-rich.
You can configure what should be displayed in the minibuffer, including the help string of the functions. You can configure the ivy-rich-display-transformers-alist. For description of variables or functions you can configure columns:
I've asked a similar question some years ago, it appears to be the byproduct of a rename: https://github.com/abo-abo/swiper/issues/915#issuecomment-286198927. To quote the relevant part:
Oh yea. By popular demand, swiper 0.7.0 -> ivy 0.8.0. On ELPA, ivy 0.8.0 bundles ivy, swiper and counsel. On MELPA, they are separate.
You're looking for counsel-recentf, which comes with counsel.
Just M-x counsel-recentf or bind it to any keys you'd like and that's all you're looking for.
Loosely speaking Ivy is the completion backend, counsel provides functionality to use ivy "replacing" some popular commands with ivy-style completion.
AFAIK, there is no built-in support for this, but Ivy provides various hooks that you can plug your own logic into. Here is one way to achieve what you want, using the ivy-hooks-alist user option:
'((counsel-M-x (:background "red")))
"Alist mapping Ivy callers to a list of face specs.
Used by `my-ivy-remap-match-face', which ...
I'm not sure why you have both (counsel-projectile-mode) and (counsel-projectile-mode nil) in your .emacs file. Have you tried simply adding a hook to start (counsel-projectile-mode) when loading projectile? Delete (or comment out) the lines you currently have for counsel-projectile-mode and try this:
(add-hook 'projectile-mode-hook 'counsel-projectile-mode)...
I have adapted your answer and extend it to toggle Help window (helpful when we want it gone from the screen without leaving the minibuffer) and perform Ivy's native TAB (albeit with one more key stroke).
(defun my-ivy-toggle-help/tab (&rest _args)
"Either describe current symbol or perform partial complete.
If last command is `self'...