90
GitHub - heavenshell/vim-pydocstring: Generate Python docstring to your Python s...
source link: https://github.com/heavenshell/vim-pydocstring
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.rst
pydocstring.vim
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
- Move your cursor on a def or class keyword line,
- type :Pydocstring or enter <C-l> (default keymapping) and
- 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)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK