pyimp.vim


Ⅰ. 插件描述

load python file from import statement

Ⅱ. 基本信息

创建日期:  2002-05-29
使用用户:  1
Github星:  1
插件作者:  Tom Jenkins

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Set of functions to open a Python import statement as a file.
This is a modification of javaimp.vim by Darren Greaves <darren@krapplets.org> http://boncey.org/vim.shtml
Suggested stuff to add to your ~.vimrc:
let $PYTHONSOURCEPATH="/usr/lib/python2.2/,/usr/lib/python2.2/lib,/usr/lib/python2.2/site-packages,~/python"
map H :call OpenPythonImport($PYTHONSOURCEPATH)<CR>
Then press H while on a import line and the file should open (you'll need the
source files and the path to have been set already.

The paths in $PYTHONSOURCEPATH should have the source packages directly
underneath each path.  The script needs to be able to add the package to the
path element and open a file.

I still need to figure out how to load the "from blah.bleh.blih import yada" type of imports

添加新评论