Hot answers tagged

4

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: Invoke counsel-ag 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-...


3

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." (interactive) (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 ...


2

You can set it after counsel is loaded with: (with-eval-after-load 'counsel (setq ivy-initial-inputs-alist nil)) See (elisp) Hooks for Loading. You can achieve the same thing with use-package as follows: (use-package counsel :defer t :config (setq ivy-initial-inputs-alist nil))


2

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.


2

Using C-M-j when you're at prompt line. Binds to ivy-immediate-done As manual states it goes with current input instead the current candidate.


2

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: ā€˜/ C-jā€™ Move to the local root directory. ā€˜~~ā€™ Move to the local home directory.


2

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: (defun my-...


2

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 ...


1

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. ...


1

You can hide those entries with (setq ivy-extra-directories nil).


1

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 ...


1

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: (:columns ((counsel-M-x-transformer (:width 40)) (ivy-rich-counsel-...


1

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.


1

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.


1

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: (defvar my-ivy-match-faces '((counsel-M-x (:background "red"))) "Alist mapping Ivy callers to a list of face specs. Used by `my-ivy-remap-match-face', which ...


1

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)...


1

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). ;;;###autoload (defun my-ivy-toggle-help/tab (&rest _args) "Either describe current symbol or perform partial complete. If last command is `self'...


Only top voted, non community-wiki answers of a minimum length are eligible