Multi-project simplifies the switching between different projects by providing support for creating, deleting, and searching between projects. Multi-project supports interactively finding a file within a project or automatically switching the TAGS file for symbol lookup.
Add the lines below in your .emacs file to use multi-project:
(require 'multi-project)
(multi-project-mode)
- Type C-x p n to create a new project.
- Provide the name of the project, project directory, and the initial cursor position within the project. For example, a src directory could be used for the initial cursor position.
- C-x p j to jump to the newly created project. Typing 's' will allow you to type a string to filter the list of projects.
- C-x p c creates a compilation command for building the project.
- C-x p g will grep the current project.
The image below shows the selection of a project from the project window and then using the multi-project find-file to filter the project files.
Multi-project has the ability to search for a file across multiple projects.
- Type C-x p j to list the projects to jump to
- Type g to specify the projects to run grep on
- Type x to execute the search
- Specify what you are looking for and the file pattern.
- The results will be displayed in separate buffers