yhat / vim-docstring

Fold your Python docstrings
19 stars 4 forks source link

vim-docstring

Python docstrings are great for helping others, but are sometimes too verbose for a developer. Fold them with ease with this vim plugin.

Install

If you use pathogen just clone to your bundle.

cd ~/.vim/bundle
git clone git@github.com:yhat/vim-docstring

If not, just stick ftplugin/python.vim in your .vim/ftplugin directory somewhere.

Usage

This vim plugin defines exactly one command which you can auto-load by adding the following to your .vimrc.

autocmd FileType python PyDocHide

Use the following vim commands to manipulate the folded docstrings.

See more help on the vim wiki.

To manually redraw the folds use the command :PyDocHide