Rectangle Edit functions: https://endlessparentheses.com/new-in-emacs-25-1-better-rectangles.html?source=rss
You can essentially use string-rectangle
to add something in a rectangle, for example, before every line.
I can also use rectangle-mark-mode
to select and edit rectangle. This will be useful for me when copy-pasting a diff with +
and -
characters preceding the code. :)
Debugging Python in Emacs
You can use gud
with pdb
to debug Python inside of emacs, it nice and jumps to source code for the next line of code. Running it is easy, just add a breakpoint in your sorce and run M-x pdb
with the command that you'd usually use to run your script or test suite.
GUD will take over as soon as you enter a pdb
session from a breakpoint. You should try, it is VERY COOL!
This is all of my python related emacs config for now:
(require-package 'virtualenvwrapper)
(require-package 'python-mode)
(require-package 'company)
;; (setq py-set-fill-column-p t)
(require-package 'sphinx-doc)
(add-hook 'python-mode-hook (lambda ()
(sphinx-doc-mode t)))
(require-package 'python-docstring)
(add-hook 'python-mode-hook (lambda ()
(python-docstring-mode)))