python_showpydoc.vim : Show document string of python3 or later in command line~
script karma |
Rating 0/0,
Downloaded by 635 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Reaper Des |
|
script type |
ftplugin |
|
description |
The script has updated for support both python2.x and python3.x
go to vimscript#3212 for new version.
Note: this plugin needs python3/dyn so that using gvim7.3 is easist and best way.
usage: commands:
:Spydoc object
the "object" can be an "imported" class, module or function(/method)
the command return document string corresponding to the object.
else return type of the object.
if the object is "unimported" the command will fail except for
modules re, vim and
FunctionType, MethodType, ModuleType, BuiltinFunctionType,
BuiltinMethodType imported from module types
tip: this plugin now is just designed for standart python3 library,
if try the command with a user-defined "object",
be very likely to get an error "name 'object' is not defined".
examples: lets say a simple python script:
import sys;
form sys import path;
class Test(object): pass;
t = Test();
and input following commands:
:Spydoc sys
sys document(module)
:Spydoc sys.exit
sys.exit document(function)
:Spydoc sys.path
type of sys.path(built-in type list)
:Spydoc path
type of os.path(same as above)
:Spydoc Test:
error: name 'Test' is not define
:Spydoc t:
error: name 't' is not define
:Spydoc sys.ss
error: 'module' object has no attribute 'ss'
:Spydoc sys.exit()
error: 'sys.exit()' is a wrong? |
|
install details |
Install: make sure "filetype plugin on" and gvim complied with python3/dyn
copy python_showpydoc.vim to your ftplugin directory |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.119.104.238
|