abo-abo / swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
https://oremacs.com/swiper/
2.3k stars 338 forks source link

Find File completion doesn't work like standard completion #2643

Open tmtvl opened 4 years ago

tmtvl commented 4 years ago

When in Emacs without Ivy I use find files and enter, for example ~/.c/r/c and hit tab, it autocompletes to ~/.config/retroarch/config. I have the magic slash in ivy disabled (to save typing), but when I enter ~/.c/r/c and hit tab nothing happens. When I hit tab twice it opens the file c in the not-yet-existant folder ~/.c/r.

Is there a way to make the Ivy file completion work like standard file completion?

basil-conto commented 4 years ago

See also #883, #1333, and #2434.

emin63 commented 12 months ago

I'm confused by this as well and have read a bunch of related issues but can't figure out how to resolve the problem. For example, Imagine I have a deep tree like

/A/b/c/d/e/f/g/h

and want to go to

/X/b/c/d/e/f/g/h

(i.e., change the start of the path to get to a similarly named path).

With the usual find-file, I would do C-a to go to the start of the line, C-f to move forward one character, C-d to delete a character and then type X followed either by RET or maybe C-e to go to the end of the line and continue completion.

I've read that I can use C-M-y to insert the full path and edit it but then it seems like I totally lose all completion features.

Is there a way to edit the path when doing find-file and then continue completion on the edited path as for the default find-file? Thanks.