Menu

Find and open files from anywhere with helm-for-files

Helm is an extremely powerful package that provides a search interface that narrows the matches as you type. What makes it powerful is the range of back-ends that you can access through helm. I don’t use it for a lot of things (I slightly prefer ivy in general), but one of my favourites is helm-for-files. This gives you a search interface where you start typing the name of a file and it narrows a list of files from multiple useful sources: currently opened files; recent files; bookmarked files; files in the current directory; and files anywhere on your system using your system’s locate command. Basically, it find any file anywhere on your system, showing you the most likely matches first. Hitting RET to select a file opens it in Emacs as usual.

Since I use a Mac, I tell helm to use mdfind which is the command line interface to the spotlight indexer in place of the normal locate command. Finally, I bind the command to C-x f to serve as a memorable alternative for C-x C-f (the default interface for opening files).