I am new to emacs (using Spacemacs with Evil and Ivy). This is how I open a file: SPC f f (counsel-find-file)
Find file:
I entered path of file. Ivy matches words one directory at a time. But drilling down is getting tiresome.
Is there a way Ivy can look into a directory to match file names a few levels down?
counsel-file-jump
useful and are running a Un*x OS, you may also like to try the built-in commandlocate
and itscounsel
counterpart,counsel-locate
, though these are a bit more scattergun than the former.counsel-file-jump
by default completes files only under the currentdefault-directory
. Are you sure you are in the expected parent directory before invoking it? Alternatively, the command prompts the user for a different directory when invoked with a prefix argument.(ivy-read "File: " (directory-files-recursively default-directory ""))
starts anivy
completion session with all files under the currentdefault-directory
(I modified the code slightly to make it more idiomatic). As it stands, however, it will merely return the selected completion candidate and not actually read any files. I recommend reading the Ivy Manual for more information.