Ⅰ. 插件描述
Package manager for Vim, retrieve info from librariesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'carakan/pmv-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'carakan/pmv-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'carakan/pmv-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/carakan/pmv.vim
Ⅳ. 文档说明
# pmv.vim Package Manager for Vim
Vim plugin that provides functions to interact with your package/lib manager for your
favorite language and it's generic!
Supported languages and package managers:
- [x] Elixir, hex
- [x] NodeJS, npm/yarn
- [x] Ruby, rubygems
- [x] Rust, cargo/cratos
Prerequisites
This plugin uses mattn/webapi-vim.
Installation
Installation with Vundle
You can install this plugin using Vundle by using the path on GitHub for this repository.
Plugin 'mattn/webapi-vim'
Plugin 'carakan/pmv.vim'How to use
Automatically Pmv knows wich function needs to calculate functions for each package manager
with this functions:
PmvLatestRelease [package]
Show the latest version of the package
PmvAllReleases [package]
Leave your cursor on a line with a package name, or pass a name as only
argument to get all the releases for given package in a little pane.
:PmvAllReleases
or
:PmvAllReleases mock
-------------------
0.1.3 (released on 2016-03-06)
0.1.2 (released on 2016-03-06)
0.1.1 (released on 2015-05-09)
0.1.0 (released on 2014-11-18)PmvAppendRelease
Leave your cursor on a line with a package name, (like {:ecto or even{:credo, only: [:dev, :test]}]) and let the magic happen.
PmvPackageInfo [package]
Leave your cursor on a line with a package name, or pass a name as only
argument to get info on the given package.
:PmvPackageInfo
or
:PmvPackageInfo portmidi
-------------------PmvOpenDocs [package]
Open the hexdocs page for the given package (or in the line under the cursor)
in the system-default browser. This doesn't check if hexdocs are published for
a package, so you might get some 404's here and there.
Note: this uses open on OSX and xdg-open on Linux systems.
PmvOpenRepoPage [package]
Open the github repo for the given package (or in the line under the cursor) in
the system-default browser.
Note: this uses open on OSX and xdg-open on Linux systems.
PmvPackageSearch [query]
Search for a query and show results.
Mappings
By default is:
| Shortcut | Command |
|---|---|
<leader>pa | :PmvAllReleases |
<leader>pd | :PmvOpenDocs |
<leader>pi | :PmvPackageInfo |
<leader>pm | :PmvLastRelease |
<leader>po | :PmvOpenRepoPage |
<leader>pp | :PmvAppendRelease |
<leader>ps | :PmvPackageSearch |
TODO's
- Async API calls
- Test's