I want that when I choose a project from the list presented by projectile-switch-project
, projectile changes the current working directory to the chosen project's root directory.
I tried this:
;; cd into dir i want, including git-root
(defun cd-dwim ()
(cd (projectile-project-root)))
(setq projectile-switch-project-action 'cd-dwim)
Did not work. It projectile-project-root does not receive the new path from the project I just chose.
I'd love if I was able to write something like this:
(setq projectile-switch-project-action
'projectile-get-the-root-directory-of-the-project-I-just-chose)
Is it possible?
dired
?cd
changes the current buffer's working directory. – omajid Nov 18 '16 at 20:45projectile-switch-project
and chose a project, a later invocation ofM-x projectile-find-file
will search files inside the root directory of the project I just chose. – ninrod Nov 18 '16 at 21:25projectile-dired
. Or just use the default bindingC-c p D
. – stackunderflow Nov 19 '16 at 3:33