FAQ
I've written an extension for VIM to allow context sensitive help for python
code. It looks up the __doc__ or __dict__ field for builtins, modules and
module members when you hit F2.

It does a little more than idle and pythonwin. I hope to add more when I find
some time. Please send me your ideas!

You can grab it at:
http://www.demonseed.net/~jp/code/pyhelp.py

You will need a version of VIM compiled with an embedded python interpreter.

-jason

Search Discussions

  • David LeBlanc at May 17, 2001 at 12:01 am
    [This followup was posted to comp.lang.python and a copy was sent to the
    cited author.]

    In article <14bud9.u5u.ln at demonseed.net>, jp at NOSPAMdemonseed.net says...
    I've written an extension for VIM to allow context sensitive help for python
    code. It looks up the __doc__ or __dict__ field for builtins, modules and
    module members when you hit F2.

    It does a little more than idle and pythonwin. I hope to add more when I find
    some time. Please send me your ideas!

    You can grab it at:
    http://www.demonseed.net/~jp/code/pyhelp.py

    You will need a version of VIM compiled with an embedded python interpreter.

    -jason
    For windows users:

    In the pyhelp file where it says "copy this file to .vim" it means a
    subdirectory of your "home" directory called ".vim". You won't be able to
    create a directory starting with a "." from the file explorer, but you
    should (on Windows NT or Windows 2000) be able to from a console window.
    Alternatively for Windows 9x and ME, you can use a "_" as the first
    letter of the directory where pyhelp.py will live, then change the ".vim"
    in the sys.path.append below to "_vim". (Remeber, this is a directory,
    not the name of a file!.)

    If you don't have a "home" directory, then you should add to your
    environment (autoexec.bat for Windows 9x or ME; settings|control
    panel|system|Environment):
    setOME=<drive>:/some/nice/place/to/put/settings/
    WITH NO SPACES IN THE PATH would be best - vim seems not to like paths
    with spaces in them! After doing this, you'll have to reboot (Windows 9x
    or ME) or quit and restart any console windows (Windows NT, 2000).

    The alternative is to change the line:
    py import sys,os; sys.path.append(os.path.expanduser("~/.vim/"))
    to:
    py import sys,os; sys.path.append("<drive>:/my/home/.vim/")

    Instead of your .vimrc (or _vimrc file as used on Windows), put the lines
    mentioned in item #2 of the directions in your .gvimrc or _gvimrc file
    if you use the GUI version of vim.

    I believe this is correct: it worked for me on Windows NT and should work
    on the other MS os's.

    Dave LeBlanc
  • Rainy at May 17, 2001 at 5:19 am

    On Wed, 16 May 2001 16:50:09 +0000, jason petrone wrote:
    I've written an extension for VIM to allow context sensitive help for python
    code. It looks up the __doc__ or __dict__ field for builtins, modules and
    module members when you hit F2.

    It does a little more than idle and pythonwin. I hope to add more when I find
    some time. Please send me your ideas!

    You can grab it at:
    http://www.demonseed.net/~jp/code/pyhelp.py

    You will need a version of VIM compiled with an embedded python interpreter.

    -jason
    That's great! Thanks a lot. I was planning to do something like that and now
    I don't have to :-).


    --
    True sailing is dead
    - Jim

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 16, '01 at 4:50p
activeMay 17, '01 at 5:19a
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase