swiper icon indicating copy to clipboard operation
swiper copied to clipboard

A way of resetting input

Open herberteuler opened this issue 2 years ago • 0 comments

I just switched from ido-mode, and one of the features that I miss in counsel-find-file is the ability to find another file that is in the same directory of a previously visited file.

In ido-mode this can be done via pressing M-p several times until the previous directory in question is shown up, and then starting to type partial names there.

But in counsel-find-file, while typing M-p can also show previously visited files, the file name is always there, one has to clear it before typing the patterns of the new file.

I find a command like this is pretty useful in such a situation:

(defun my-ivy-reset-input ()
  (interactive)
  (delete-region (line-beginning-position) (line-end-position)))

Binding it to C-l and I'm quite satisfied.

How about adding this feature?

herberteuler avatar Dec 19 '22 05:12 herberteuler