In vim it's very easy to find a file without knowing which directory the file is in. Doing this ":args **/file.hpp" if the file exists, it will get it open.
Is there any substitution in Emacs to do so? The find-file seems work for wildcards, but it doesn't do the tricky like vim does with **
.
To find a file in Emacs, you use the C-x C-f ( find-file ) command.
You can type the 'cd' emacs command. ( M-x cd ) to change the default folder as a one off.
Use Ctrl-x f to open a file from within Emacs. Create a new file in the same way as opening a file by specifying the new filename. The new file will not be saved unless specified. Save a file that is currently open by entering the Ctrl-x Ctrl-s command.
M-x find-name-dired
looks like what You want (You will be prompted for root directory to start search with and a file mask)
A more blunt but still handy tool: M-x locate
Using OS X? This makes emacs use spotlight instead of the standard locate
:
(setq locate-command "mdfind")
A good tip if you use ido-find-file
:
From a known root directory, you can use ido-wide-find-file-or-pop-dir
, which by default is bound to M-f.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With