0

I am considering moving from VScode to emacs, mostly motivated by the awesomeness of emacs; and by org-mode.

But I am genuinely struggling to be comfortable without having a project tree view. How do emacs veterans manage projects with tens / hundreds of files? How do you find files without a visual tree of the project? Operating on a tree view seems to be intuitive.

Update: I also want to mention that I would like to learn the "emacs" way of doing things.

1
  • try neotree.. Commented Feb 28, 2024 at 15:06

1 Answer 1

2

This question will be closed because it is opinion–based and therefore not a good fit for StackExchange, but I’ll answer it any way.

I use Projectile, which is a small Emacs package that adds project–specific versions of normal Emacs commands. For example, the find-file command (normally bound to C-x C-f) lets you open any file on your computer (or on any computer you can connect to). The corresponding Projectile command projectile-find-file (which I bound to C-c p f) lets you open any file in the current project. The grep command lets you do a text search of all the files in any directory, while projectile-grep lets you do the same search on all files in the current project. You get the idea.

So when I want to work on a specific part of the code in my current project, I use projectile-find-file. It prompts for a file name. Of course I don’t have to type the whole file name; it uses my preferred autocompletion package to allow me to type any part of the name and it will find the file that matches. For example, if I am working on Cataclysm: Dark Days Ahead and I want to work on the Autopickup Manager window, I type “autop” and it brings “auto_pickup.cpp” to the front of the list. There’s never any need to see the whole list of files; all I care about are the ones that match what I have typed.

There are other commands that I use all the time too, like xref-find-definitions (bound to M-.). This looks at the symbol under the point and jumps to where it is defined. Traditionally it looks this information up in a TAGS file, but if you are using an LSP server then it will query the server instead. This often means I don’t even need to know the file name at all, let alone see all of the source files in a big list.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.