Better function to insert breakpoint in python mode, auto-indent and save the file.
This commit is contained in:
parent
f38ff189e2
commit
dfab1eed14
|
@ -14,7 +14,9 @@
|
||||||
|
|
||||||
;; from http://pedrokroger.net/2010/07/configuring-emacs-as-a-python-ide-2/
|
;; from http://pedrokroger.net/2010/07/configuring-emacs-as-a-python-ide-2/
|
||||||
(defun python-add-breakpoint ()
|
(defun python-add-breakpoint ()
|
||||||
"Add a break point and highlight it."
|
"Add a break point, highlight it and save the buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(evil-end-of-line)
|
||||||
(newline-and-indent)
|
(newline-and-indent)
|
||||||
(insert "import pdb; pdb.set_trace()"))
|
(insert "import pdb; pdb.set_trace()")
|
||||||
|
(save-buffer))
|
||||||
|
|
Loading…
Reference in a new issue