Hot answers tagged

6

You can insert symbol at point with M-n - the same key as the history forward, which is one of the recommended Emacs workflows for inserting thing at point. Additionally, M-j will extend the minibuffer by word at point, similar to what C-w does for isearch.


6

Try C-c C-o (ivy-occur) in the minibuffer.


5

When you invoke swiper press M-p to search for previously searched thing. M-n will let you search for the word under cursor. C-s will search for the next occurence. UPD, thx @Basil After you invoke the swiper press C-s to search for a previously searched string. Press C-s again to go to the next occurrence.


5

Try M-j, which is bound to ivy-yank-word in the ivy minibuffer key map. It's worth reading through the the ivy manual, either in Emacs or online. The relevant key bindings are discussed here: http://oremacs.com/swiper/#key-bindings-that-alter-the-minibuffer-input


4

Press C-' (swiper-avy) to select any visible candidate. Even if there are many candidates on the same line.


3

It's a bit tricky, since you can't call anything after read-from-minibuffer (called by ivy-read called by swiper) until it returns. However, there's a visible function swiper--update-input-ivy that's called in post-command-hook. You can advice this function. It could also be possible to advice ivy--exhibit (it's always in the minibuffer's post-command-hook), ...


3

You need to customize swiper-helm-display-function. In swiper-helm, helm-display-function is let-bound to swiper-helm-display-function. Should be as simple as: (setq swiper-helm-display-function 'helm-default-display-buffer) As for other commands that you asked about, it's likely that they bind helm-display-function as well. Just examine their code and ...


2

Its not quite the word at point, but M-j puts the current subword in the minibuffer. If you are at the beginning of the word, it puts the word in.


2

You probably want: (setq ivy-format-function 'ivy-format-function-line)


2

I use helm-swoop just like what you described, so the same technique can work for you in swiper too. Helm-swoop picks up the input at point and I want it to be selected automatically, so I can instantly overtype it with delete selection mode. I push the selection keys to unread command events, so they are executed automatically when swoop is waiting for ...


1

C-s after calling swiper will bring up the last search. M-p will iterate back through the search history. M-n will do the same the other way. If you followed the installation instructions and used the proposed bindings, swiper-isearch is bound to C-s, so C-s C-s will do what you want with zero effort. As @NickD pointed, Swiper is an isearch replacement, most ...


1

You can try (setq swiper-stay-on-quit t). When you hit C-g you'll be redirected to the location selected by swiper.


1

For completeness, here is what I ended up implementing, based on @Tom's answer: (defun acg/with-marked-input (&rest args) "Mark input of minibuffer. To be used as advice before any function that starts with an initial input in the minibuffer." (run-with-idle-timer 0 nil (lambda () (push 'C-S-right unread-command-events) (...


1

I don't have an answer related to Swiper, sorry. But FWIW, Icicles provides what (I think) you're describing. You can insert buffer text at point into the minibuffer (appending it to what's already there). You can take advantage of this feature for searching by using M-e when incremental-searching. That puts you in the minibuffer to edit the search ...


1

Adding the following to my .emacs seems to solve the problem: (package-initialize) But I'm a little bit confused, because 41.1 Packaging Basics says that Whenever Emacs starts up, it automatically calls the function package-initialize to load installed packages. Moreover, I had the same version of Emacs on a Linux machine, and I'm using the same ...


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