vim-ped


Ⅰ. 插件描述

:athletic_shoe: Quickly open Python modules in vim

Ⅱ. 基本信息

创建日期:  2015-09-08
使用用户:  3
Github星:  11
插件作者:  Steven Loria

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# ped.vim

Quickly open Python modules based on Python import paths.

This is particularly useful for viewing/editing third-party packages in a virtual environment.

Quickstart

:Ped <path.to.module>

Examples

:Ped django.shortcuts
:Ped django.views.generic.TemplateView

" Partial matches work, too
:Ped django.views.generic.Templ

Installation

Requires the ped Python package (installable with pip).

$ pip install -U ped

Then add this plugin using your favorite plugin manager.

Using vim-plug:

" ~/.vimrc
Plug 'sloria/vim-ped'

Defining mappings

  • <Plug>PedPrompt: Shortcut to input :Ped in the command line.
  • <Plug>PedVword: Input :Ped pkg in the command line, where "pkg" is the current visual selection.
  • <Plug>PedVwordExec: Like <Plug>PedVword, but executes immediately.
  • <Plug>PedCword: Input :Ped pkg in the command line, where "pkg" is the current word under the cursor.
  • <Plug>PedCwordExec: Like <Plug>PedCword, but executes immediately.

Example mappings

nmap <leader>e <Plug>PedPrompt
nmap <leader>E <Plug>PedCwordExec
vmap <leader>e <Plug>PedVwordExec

Configuration

" Vim command to open files, defaults to 'edit'
" Examples: 'tabedit', 'split', 'vsplit'
let g:ped_edit_command = 'edit'

" ped executable, defaults to 'ped'
let g:ped_executable = 'ped'

License

MIT Licensed.

添加新评论