                                nil (ansi-term shell-pop-term-shell))))
 (setq shell-pop-window-position "bottom")
 
+(defun ar/disable-non-prog-minor-modes ()
+  "Disables non-programming minor modes, likely slowing things down."
+  (centered-cursor-mode -1)
+  (linum-mode -1))
+
 ;;  No need for linum under ansi-term, also avoids flickering.
-(add-hook 'term-mode-hook (lambda ()
-                            (centered-cursor-mode -1)
-                            (linum-mode -1)))
+(add-hook 'term-mode-hook #'ar/disable-non-prog-minor-modes)
+(add-hook 'magit-mode-hook #'ar/disable-non-prog-minor-modes)
 
 (global-set-key [f5] 'shell-pop)
 (use-package shell-pop


;; Hide dired details by default.
(add-hook 'dired-mode-hook 'dired-hide-details-mode)

(defun ar/find-all-dired-current-dir ()
  "Invokes find-dired for current dir."


;; Enable RET to follow Org links.
(setq org-return-follows-link t)
