pythoncomplete.vim


Ⅰ. 插件描述

A copy of http://www.vim.org/scripts/script.php?script_id=1542 with a few enhancements

Ⅱ. 基本信息

创建日期:  2011-08-30
使用用户:  9
Github星:  7
插件作者:  Michael Brown

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'mjbrownie/pythoncomplete-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'mjbrownie/pythoncomplete-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'mjbrownie/pythoncomplete-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/mjbrownie/pythoncomplete.vim

Ⅳ. 文档说明

pythoncomplete.vim

This is a fork of the current pythoncomplete omnicomplete function with a few enhancements

http://www.vim.org/scripts/script.php?script_id=1542

http://www.vim.org/scripts/download_script.php?src_id=10872

Function completion for Sub Classes

Example

class Foo(object):

def spondonicle(self,somearg,someotherarg):
    pass

class SubFoo(Foo):

def wibble(self,anotherarg,foo=None):
    pass

def s<c-x><c-o> <!-- shou;d complete spondonicle here

class SubSubFoo(SubFoo):

def spondonicle(self,somearg,someotherarg):
    pass

def w<c-x><c-o> should show wibble here

Sys Path Import completion

from datetime import ti<c-x><c-o> <--- should import timedelta here

BUGS:

This is a work in progress. There needs to be a lot of filtering out of irrelevant arguments.

Some modules will complain on a dir() function

Doc strings need to be filtered

添加新评论