python_open_module


Ⅰ. 插件描述

open the python module file below the cursor when coding python

Ⅱ. 基本信息

创建日期:  2008-12-07
使用用户:  1
Github星:  2
插件作者:  tocer deng

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

the python_open_module.vim is the script that allows you open the module file  below the cursor when coding python. It's easy to use. For example, you can create a new python file and input:

import string

move the cursor above "string" and press "<LocalLeader>oo"("oo" in common in vim) in normal mode You could see the string.py file opened in current window. you can continue to input:

string.lower

do same above and you can see string.py file opened the cursor jump into lower function.

the open fail if the module is buildin such as 'sys' or is not available.

There are three options for mapping key, you can chang it to any other key:

pom_key_open='<LocalLeader>oo'              # open module file in the current window
pom_key_open_in_win='<LocalLeader>ow'             # open module file in a new window
pom_key_open_in_tab='<LocalLeader>ot'               # open module file in a tab

WORNING: Required vim compiled with +python

添加新评论