System Crafters

Projectile and Magit

Projectile


(use-package projectile
  :diminish projectile-mode
  :config (projectile-mode)
  :bind-keymap
  ("C-c p" . projectile-command-map)
  :init
  (when (file-directory-p "~/Projects/Code")
    (setq projectile-project-search-path '("~/Projects/Code")))
  (setq projectile-switch-project-action #'projectile-dired))

Projectile on GitHub Projectile Manual Projectile Manual - Project Settings Emacs Manual: Directory-Local Variables

  • Run project C-c p u
  • Run tests: C-c p P
  • Edit dir-locals: C-c p E (reload with hack-dir-local-variables-non-file-buffer)

counsel-projectile

counsel-projectile on GitHub


(use-package counsel-projectile
 :after projectile
 :config
 (counsel-projectile-mode 1))

  • Advanced project switching: C-c p p
  • Quick searching with counsel-projectile-rg - C-c p s r
    • Results to buffer with C-c C-o

Magit

Magit on GitHub Magit Official Site Magit Manual


(use-package magit
  :commands (magit-status magit-get-current-branch)
  :custom
  (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))

(use-package evil-magit
  :after magit)

Operations

Run magit-status in buffer from Git repo, press ? for command panel.

Refresh buffer with g r

  • Diffs
  • Commit log
  • Blame
  • Stashes
  • Branches
  • Rebase
  • Pull/push

Forge

Forge on GitHub Forge Manual

Important: Instructions to set up your GitHub token


(use-package forge)