Generate Sphinx Friendly Docstrings For Python Functions In Emacs!

1 min read
Today, I went to Django REST Framework Workshop. After the workshop is completed,  and we were discussing about Emacs, Krace showed this cool plugin sphinx-doc, it inserts docstring skeleton for Python functions/methods as per the requirement of the Sphinx documentation generator.


To install it from MELPA, run "M-x package-list-packages", search for "sphinx-doc" , mark it with i and press x to install.


Add these lines to Your emacs config to enable sphinx-doc-mode.
(add-hook 'python-mode-hook (lambda ()
                  (require 'sphinx-doc)
                  (sphinx-doc-mode t)))
If you document your code(infact you should), this plugin saves quite a few strokes! 

I am Chillar Anand. I daydream a lot and write about the things that interest me here. You can read more about this blog here.

See all articles

RSS Feed for the blog

Edit this page