6

I'm using emacs (technically: spacemacs with helm). It seems that any time I call a function which requires a directory, I am presented with something like the following:

enter image description here

The problem:

If I am in /a/path/to/a/directory but I want to get to /a/path/to/a/directory/that/has/a/deep/nested_file, I cannot just type nested_file and have it autocomplete. Instead I have to type each nested level of directories before I can get to nested_file.

Is there a way around this?

George
  • 879
  • 5
  • 17

1 Answers1

2

You can use package helm-locate while searching by issuing C-u C-x C-f. This will, however, search globally.

If you are in a Git repository you can also do helm-ls-git-ls with C-x C-d, searching in the Git repository. This requires the package helm-ls-git.

See also https://github.com/emacs-helm/helm/issues/539 as a reference.

Edit: You need to set keybindings as follows:

(global-set-key (kbd "C-x C-f") 'helm-find-files)
theldoria
  • 1,825
  • 1
  • 13
  • 25
  • `helm-locate` seems to search for directories. In this particular case, (i.e., with `append-to-file`) the command is searching for files, and issuing `C-u C-x C-f` doesn't start helm-locate. I'm running Emacs 25. – George Jul 14 '17 at 06:39
  • I added a bounty for a related question in case it's of interest: https://emacs.stackexchange.com/questions/34087/how-does-emacs-know-to-use-helm-find-files-in-this-context – George Jul 14 '17 at 06:40