(when (maybe-require-package 'projectile)
  (add-hook 'after-init-hook 'projectile-mode)

  (setq projectile-keymap-prefix (kbd "C-c C-p"))

  ;; Shorter modeline
  (after-load 'projectile
    (setq-default
     projectile-mode-line
     '(:eval
       (if (file-remote-p default-directory)
           " Proj"
         (format " Proj[%s]" (projectile-project-name)))))))


(provide 'init-projectile)

(when (maybe-require-package 'projectile)
  (add-hook 'after-init-hook 'projectile-mode)

  (after-load 'projectile
    (define-key projectile-mode-map (kbd "C-c C-p") 'projectile-command-map)

    ;; Shorter modeline
    (setq-default
     projectile-mode-line
     '(:eval
       (if (file-remote-p default-directory)
           " Proj"
         (format " Proj[%s]" (projectile-project-name)))))))


(provide 'init-projectile)

Use define-key instead of outdated projectile-keymap-prefix
Use define-key instead of outdated projectile-keymap-prefix

svenyurgensson/emacs.d