sponsor Vim development Vim logo Vim Book Ad

pyref.vim : Context-sensitive documentation for Python source code

 script karma  Rating 21/6, Downloaded by 3107    Comments, bugs, improvements  Vim wiki

created by
Peter Odding
script type
The file "pyref.vim" is a plug-in for the Vim text editor that maps the <F1> key in Python buffers to search through the Python language and library reference documentation for the keyword or identifier at the current cursor position and open the first match in your web browser. When no GUI is available a command-line web browser like lynx or w3m will be used, otherwise the plug-in prefers a graphical web browser like Mozilla Firefox or Google Chrome. For more information about the plug-in please refer to its homepage or the project page on GitHub:


If you have questions, bug reports, suggestions, etc. the author can be contacted at peter@peterodding.com. If you like this plug-in please vote for it below!

If you don't like using your web browser to read documentation but would rather do so inside Vim, or if you need the documentation of a module that's not in the Python standard library, try vimscript #910 and vimscript #1112. Both of these use the "pydoc.py" Python script included with the standard Python installation, which means they automatically work on all modules known to Python (including user-defined modules).
install details
Unzip the most recent ZIP archive file (see below) inside your Vim profile directory (usually this is "~/.vim" on UNIX and "%USERPROFILE%\vimfiles" on Windows), restart Vim and execute the command ":helptags ~/.vim/doc" (use ":helptags ~\vimfiles\doc" instead on Windows). Now try it out: Open a Python script and press the <F1> key on any interesting identifier. If it doesn't work at first, please check the README included in the ZIP.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
pyref.zip 0.7.16 2013-08-19 7.0 Peter Odding Remove embedded miscellaneous scripts (they need to be installed separately from now on):

Document vim-misc as external dependency:

Make sure vim-misc is installed, politely complain if it isn't:

Remove vim-misc compatibility check (missed that):
pyref.zip 0.7.14 2013-05-20 7.0 Peter Odding Updated miscellaneous scripts:
pyref.zip 0.7.13 2013-05-19 7.0 Peter Odding Updated miscellaneous scripts:
pyref.zip 0.7.12 2013-05-13 7.0 Peter Odding Updated miscellaneous scripts:
pyref.zip 0.7.11 2013-05-02 7.0 Peter Odding Updated miscellaneous scripts:
pyref.zip 0.7.10 2013-04-28 7.0 Peter Odding Updated miscellaneous scripts:
pyref.zip 0.7.9 2013-04-21 7.0 Peter Odding Make compatibility with miscellaneous scripts explicit:
pyref.zip 0.7.8 2011-11-26 7.0 Peter Odding Updated miscellaneous scripts:
pyref.zip 0.7.7 2011-11-21 7.0 Peter Odding Updated miscellaneous scripts:
pyref.zip 0.7.6 2011-09-25 7.0 Peter Odding Updated miscellaneous scripts:
pyref.zip 0.7.5 2011-09-04 7.0 Peter Odding Move the index (and spider) to the proper location:

Define version as variable, include in messages:

Updated miscellaneous scripts
pyref.zip 0.7 2010-12-19 7.0 Peter Odding Now with out of the box support for Django documentation:
pyref.zip 0.6 2010-09-18 7.0 Peter Odding Moved OpenBrowser() to external autoload plug-in:

Added :PyRef command, converted to autoload script:
pyref.zip 0.5 2010-06-08 7.0 Peter Odding * Make all searches case-sensitive since Python is as well
* Search for substring match on word boundaries
* Progressively smaller suffix search now uses word boundary
* If verbose is >= 1 pyref.vim reports used search patterns

See the changeset at http://github.com/xolox/vim-pyref/commit/175bf469a0c556f8596604892ce2c309f19582d7
pyref.zip 0.4.2 2010-06-06 7.0 Peter Odding Fixed broken links in README
pyref.zip 0.4.1 2010-06-06 7.0 Peter Odding Includes generated Vim documentation based on README
pyref.zip 0.4 2010-06-03 7.0 Peter Odding * Moved all remaining documentation from pyref.vim to README.md

* Re-organized the plug-in to make it auto-update compatible (using the getscript plug-in).
  This also simplifies installation: Just unzip the latest release inside your ~/.vim/ directory.

* Support for exceptions imported from the `exceptions` module
pyref.zip 0.3 2010-06-03 7.0 Peter Odding * Bug fix: Don't map insert mode when mapping is printable character

* Improved auto-detection of the appropriate browser (CLI vs. GUI)

* Resolve object attributes to standard library identifiers.

* Included README.html for people who don't like Markdown :-)
pyref.zip 0.2 2010-05-26 7.0 Peter Odding Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo