 
 (use-package centered-window-mode
   :config
-  (centered-window-mode)
   (add-hook 'ediff-before-setup-hook 'centered-window-mode-toggle)
   (add-hook 'ediff-quit-hook 'centered-window-mode-toggle 'append)
   (add-hook 'ediff-suspend-hook 'centered-window-mode-toggle 'append))
 
 (use-package popwin
-  :config
+  :defines popwin:keymap
+  :functions popwin-mode
+  :config
+  ;; (popwin-mode) has to be activated like this because it is not autoloaded
   (popwin-mode 1)
   (bind-key "C-z" popwin:keymap))
 

(use-package treemacs
  :config
  (setq treemacs-icon-fallback-text (propertize "  " 'face 'font-lock-keyword-face))
  (bind-keys :prefix-map treemacs-prefix-map
             :prefix "M-m"
             ("f T"   . treemacs)
             ("f t"   . treemacs-toggle)
             ("f B"   . treemacs-bookmark)
             ("f C-f" . treemacs-find-file)
             ("f C-t" . treemacs-find-tag)))

(eval-when-compile (require 'use-package))
(require 'bind-key)

(bind-keys ("C-c f"       . follow-mode)
           ("C-c a"       . align)
           ("M-;"         . comment-dwim-line-or-region)
           ;; Rebind windmove keys
           ("C-c <left>"  . windmove-left)
