vim-pipenv


Ⅰ. 插件描述

Vim plugin for detecting & interacting with Pipenv

Ⅱ. 基本信息

创建日期:  2018-10-22
使用用户:  5
Github星:  16
插件作者:  Pieterjan Montens

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# pipenv.vim

Inspired by and using vim-virtualenv, vim-pipenv detects the venv of the pipenv projects you open and activates the corresponding venv.

pipenv-vim will auto-detect the pipenv of any python file you open, and if auto-switching is enabled, will switch to the corresponding venv (see :help pipenv for options).

You can also issue commands to pipenv with the :Pipenv command, of which the output will be displayed once the command is done (which.. can take some time. Working on it.).

This is still very much a work in progress, and has only been tested in Linux ;)

the author

Usage Examples

Get help

:help pipenv

See pipenv graph

:Pipenv graph

Install & lock pyyaml in dev packages

:Pipenv install pyyaml --dev

Activate Pipenv venv for current file

:Pipenv

:Pvv is provided as alias for :Pipenv

Use <tab> to switch between available commands.

Installing

vim-pipenv depends on the excellent vim-virtualenv:
make sure you install it too (or just follow guidelines bellow to install both at the same time)

Using pathogen

First make sure you have Pathogen, then

cd ~/.vim
mkdir -p bundle && cd bundle
git clone https://github.com/PieterjanMontens/vim-pipenv
# Install vim-virtualenv as well
git clone https://github.com/plytophogy/vim-virtualenv

Vundle

Using Vundle, install goes like this:

Add these lines to your vundle plugins in your .vimrc

Plugin 'plytophogy/vim-virtualenv'
Plugin 'PieterjanMontens/vim-pipenv'

Open vim and run :PluginInstall.

Updating

Using git:

git -C ~/.vim/bundle/vim-pipenv pull

Using Vundle from within vim: :PluginUpdate

Removing

rm -rf ~/.vim/bundle/vim-pipenv

With __Vundle__: remove corresponding plugin line from .vimrc and run :PluginUpdate

添加新评论