sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

vimmp : An XMMS2 and MPD client for Vim

 script karma  Rating 5/2, Downloaded by 828    Comments, bugs, improvements  Vim wiki

created by
Xin Wang
 
script type
utility
 
description
This plugin is based on vimscript #2363, and add MPD support.

Requirements
============
    Vim with +python support.
    FOR XMMS2: XMMS2 with the Python interface.
    FOR MPD: MPD and python-mpd.

Usage
=====
    Using <leader>x to toggle the play window.

    Also the following key shorts are available. Most key maps start with
    c(Control) or l(playList).

      <space>    Play the song under cursor.
      <cr>       Same as <space>.
      cs         Stop.
      cp         Pause.
      cr         Select a repeat mode.
                 There are three modes for XMMS2: one, all, off.
                 For MPD, there are two: off, all. So there command just toggle.
      -          Decrease volume.
      =          Increase volume.
      r          Refresh window manually.
      la         Add a file or directory to playlist.
      lc         Clear the playlist.
      ld         Remove the song under cursor from current playlist.
      lf         Shuffer the list.
      ll         Load a playlist.
      ln         Create a new playlist, and save current contents to it.
      ls         Sort the playlist, by artist, title or filename.
                 Only available for XMMS2.


Customization
=============
    Specify the id3's encoding. This option is only for XMMS2, i.e
        let g:xmms_id3_encoding="gbk"

    Specify the play window's width:
        let g:xmms_window_width=30

    Specify the playlist format, default is "%artist - %title", %album
    is also avaiable.
        let g:xmms_playlist_format="%title"


Notes for MPD users
===================
    - There's only one playlist which MPD uses to play, users can only load
      other playlists' contents to that list. So the playlist name displayed
      in the status line is just the playlist's version number.
    - Currently, this plugin only support localhost mpd server.


Tips
====
    When adding music file or directory, you can use Ctrl-D to show all
    candidates. Also, you can use arrow keys to navigate the history.

Leave your comments in following link, or just mail me.
http://danran.72pines.com/vimmp
 
install details
    Putting following lines into your .vimrc

        if has('python')
            py import os, sys
            py sys.path.append(os.path.expanduser("/path/to/the/vimmp/dir/"))
            pyf /path/to/main.py
        endif

    For example, I put the vimmp dir in ~/.vim, so the lines will be:

        if has('python')
            py import os, sys
            py sys.path.append(os.path.expanduser("~/.vim/vimmp"))
            pyf ~/.vim/vimmp/main.py
        endif

    Then specify what server you are using, "xmms2" or "mpd". (Although
    the script will try to guess, but it's better to set it manually.)
        let g:vimmp_server_type="xmms2"

    Also, add following map into .vimrc

        nmap <silent> <leader>x :py vimmp_toggle()<cr>

    FOR MPD USERS
    -------------
    In addtion to above settings, you also have to set the music and
    playlist directory. They should be the same as in /etc/mpd.conf. i.e.
        let g:mpd_music_directory="~/music"
        let g:mpd_playlist_directory="~/.mpd/playlists"

 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vimmp-0.1.1.tgz 0.1.1 2008-09-03 7.0 Xin Wang Add description about the important g:vimmp_server_type option in the document.
vimmp-0.1.tgz 0.1 2008-09-03 7.0 Xin Wang Initial upload
ip used for rating: 54.224.19.6

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo