Skip to content

claymcleod/vim-pydocstring

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Generate Python docstring to your Python script file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Vim Script 89.8%
  • Shell 10.2%