I switched to Org Mode and Emacs few weeks ago. I find it incredibly better than my previous (simple but effective) setup based on markdown files and VS Code editor.
I'm learning new features everyday but there's one thing from VS Code that I really miss and I can't think how to reproduce it in Emacs:
I'd like to open a specific directory (like /OrgMode
) like a "workspace" and then be able to launch a command to find a file in the directory itself. Really simple. In VS Code I used to launch CMD+P
(macOS) or CTRL+P
(Win) to open a Spotlight-like file search. It was incredibly quick, useful and powerful.
It placed most opened files at the top of the list, updating the order dynamically. But it's OK if I can't reproduce it exactly in Emacs right now. All I want is an effective way to find a file based on my (partial and not necessarily using the beginning part of the filename) keyboard input.
Can you help me?
** Clarifying Edit ** I want to open a directory as the active workspace. Then, I need a command that will ask for my input so that I can quickly open a file within the directory itself.
Example:
Directories on my disk:
/OrgMode/Projects.org
/OrgMode/Todo.org
/OrgMode/MonkeyIsland.org
Then:
M-x command-im-looking-for
- I type
isl
- A list containing
MonkeyIsland.org
appears RET
visits the file.
M-x rgrep
might do what you need – Tyler May 14 '19 at 19:06C-x C-f
will prompt you for a file to open, provides tab-completion to select the file, and starts in your current directory. Is that what you want? – Tyler May 14 '19 at 21:34dired
? I use it all the time and it might help – mikado May 14 '19 at 21:37counsel-find-file
, from this repo https://github.com/abo-abo/swiperido-find-file
(ships with emacs) will be probably even closer to what you are looking for – andrej May 15 '19 at 12:44dired
(I actually use a custom function). Switching files then becomes a matter of switching buffers withC-x C-b
. Let me know if this is what you want and I can post a more detailed answer. https://emacs.stackexchange.com/questions/44759/set-a-global-default-directory There is alsoprojectile
which may meet your needs. – Lorem Ipsum May 15 '19 at 16:21