Skip to content
Generate Python docstring to your Python script file.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Add demo movie May 21, 2017
autoload Release 0.6.0 (#56) Jun 30, 2018
doc
ftplugin/python Release 0.6.0 (#56) Jun 30, 2018
template/pydocstring Fix/rename (#37) Nov 18, 2017
test Fix {{_return_type_}} did not indented (#55) Jun 30, 2018
.gitignore Setup for testing Nov 18, 2016
.travis.yml Fix remove blank line above {{_return_type_}} (#39) Nov 19, 2017
CHANGES.rst Release 0.6.0 (#56) Jun 30, 2018
LICENSE First commit Jan 18, 2012
README.rst Add demo movie May 21, 2017

README.rst

pydocstring.vim

https://travis-ci.org/heavenshell/vim-pydocstring.svg?branch=master

./assets/vim-pydocstring.gif

Pydocstring is a generator for Python docstrings and is capable of automatically

  • inserting one-line docstrings
  • inserting multi-line docstrings
  • inserting comments

This plugin is heavily inspired by phpdoc.vim and sonictemplate.vim.

Usage

  1. Move your cursor on a def or class keyword line,
  2. type :Pydocstring or enter <C-l> (default keymapping) and
  3. watch a docstring template magically appear below the current line

Settings

Pydocstring depends on softtabstop. You need to set like set softtabstop=4.

Example .vimrc

autocmd FileType python setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab

Key map

If you want change default keymapping, set following to your .vimrc.

nmap <silent> <C-_> <Plug>(pydocstring)
You can’t perform that action at this time.