Better function to insert breakpoint in python mode, auto-indent and save the file.

This commit is contained in:
syl20bnr 2013-07-10 15:53:45 -04:00 committed by sbenner
parent f38ff189e2
commit dfab1eed14

View file

@ -14,7 +14,9 @@
;; from http://pedrokroger.net/2010/07/configuring-emacs-as-a-python-ide-2/
(defun python-add-breakpoint ()
"Add a break point and highlight it."
"Add a break point, highlight it and save the buffer."
(interactive)
(evil-end-of-line)
(newline-and-indent)
(insert "import pdb; pdb.set_trace()"))
(insert "import pdb; pdb.set_trace()")
(save-buffer))