How can I bind C-x C-f to invoke projectile-find-file
when inside a project, and ido-find-file
when not in a project?
1 Answer
Write your own command that checks:
(defun maybe-projectile-find-file ()
(interactive)
(call-interactively
(if (projectile-project-p)
#'projectile-find-file
#'ido-find-file)))
(global-set-key (kbd "C-x C-f") 'maybe-projectile-find-file)