                                         (org-remove-inline-images)))
 
 ;; Python mode
-(setq-default python-fill-docstring-style 'pep-257-nn)
-(add-hook 'python-mode-hook
-          (lambda ()
-            (local-set-key (kbd "C-c d")
-                           (lambda ()
-                             (interactive)
-                             (insert "import ipdb; ipdb.set_trace()")))))
-(add-hook 'python-mode-hook 'jedi:setup)
-(setq jedi:complete-on-dot t)
+(defun j/python-insert-debugger ()
+  "Insert a debugger statement at point"
+  (interactive)
+  (insert "import ipdb; ipdb.set_trace()"))
 
 (defun j/python-method-space-replace ()
   "SPC while naming a defined method insert an underscore"

(if window-system (global-centered-cursor-mode t))

;; coffee-mode
(add-hook 'coffee-mode-hook
          (lambda ()
            (setq coffee-tab-width 2)))

;; desktop-mode
(desktop-save-mode t)

      (insert "_")
    (insert " ")))

(setq-default python-fill-docstring-style 'pep-257-nn)

(setq jedi:complete-on-dot t)
(add-hook 'python-mode-hook 'jedi:setup)

(eval-after-load 'python
  (lambda ()
    (define-key python-mode-map (kbd "C-c d") 'j/python-insert-debugger)
    (define-key python-mode-map (kbd "SPC") 'j/python-method-space-replace)))

;; prog-mode
(add-hook 'prog-mode-hook 'flyspell-prog-mode)
