Projectile and switching to a dired buffer or a recently used fileI like projectile because it allows me to quickly switch to a project and kill all related buffers. However, when you ask to switch to a project, Spacemacs is configured to ask you the buffer you want to open in the target project. Probably this is also true for vanilla Emacs, but I have not checked.
Often, what I want to do is to switch to another project and open the dired list of files, so that I can navigate and decide what to open within that project. Why? Because often I do not remember the structure of the project!
<br() It simple enough to configure it in your Emacs configuration file:
(setq projectile-switch-project-action 'projectile-dired)
In fact, the
projectile-switch-project-actioncan be customied to execute the function
projectile-diredthat in turns open the dired buffer on the project root.
But the Projectile documentation tells more: it is possible to use the
projectile-commanderthat allows for a manual selection of what to do on a project switch, with particular regard to my favourites:
Dopen a dired buffer in the project root;
dfinds a file in the project;
elist recently used files.