Ⅰ. 插件描述
A Vim plugin to control MPC playerⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'durgaswaroop/vim-mpc'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'durgaswaroop/vim-mpc'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'durgaswaroop/vim-mpc'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/durgaswaroop/vim-mpc
Ⅳ. 文档说明
# Vim-mpc
Vim Plugin for MPC Player
MPC is an Open source media player that works with MPD Daemon. This plugin allows you to easily interact with that daemon.
Vim and music is a great combination. Listening to your favorite MJ song while coding makes you a Bad ass programmer. But to change a song, Pause/Play it, you have to leave Vim and open the media player. Being able to control your media player from Vim makes you a Badder ass.
Let Vim-mpc take care of that while you code listening to Thriller.
This is how the Playlist window looks like.
Let's see a Demo. Shall We ?

Now that's smooth. Smooth like a Criminal!
Installing
Install it using any Plugin manager of your choice. If you don't have a preference, I recommend Pathogen by Tim Pope.
To install using Pathogen,
cd ~/.vim/bundle # For linux
# vimfiles/bundle in Windows
git clone https://github.com/durgaswaroop/vim-mpc.gitDefault Keymaps & Commands
Once installed, you can use the following commands
Ctrl + x- Plays the selected song in the Playlist windowCtrl + a- Random On or Off in the Playlist WindowCtrl + e- Repeat On or Off in the Playlist Window
Customizing
You can map your own key bindings for various tasks using the <plug> mappings that are available as follows:
- :MpcPlaylistBrowser
- :MpcTogglePlayback
- :MpcIncreaseVolume
- :MpcDecreaseVolume
- :MpcPlayNext
- :MpcPlayPrev
They are named appropriately and so they will do what their name suggests they will.
Attribution
This plugin is possible because of the book VimL Primer from The Pragmatic Bookshelf. Its a must read for anyone looking to learn Vim scripting.