GithubHelp home page GithubHelp logo

vimify's Introduction

About

Vimify

vimify is a plugin for Vim origionally inspired by MuAnsari96. It provides a simple Spotify integration within Vim to search and play music on OSX and Linux. This version of vimify uses AppleScript to talk with spotify on Mac and Dbus on linux. If you managed to open vim and load this plugin, your system will have the right one installed.

Just make sure you have Spotify installed somewhere and the plugin should work. You will need to have built vim with Python3 support or load python3 in neovim for this plugin to work.

Big thanks to Mattpenney89 for writing the linux bits and updating the scripts to python 3

For the search functions you will need to follow the new instructions in the setup part of this readme. Linux support trough Dbus / some code cleaning is underway, as well as looking for albums and artist.

Features and Usage

vimify is designed to interface with a running desktop instance of Spotify. Currently, the following features are supported:

  • :SpPlay will play the current track
  • :SpPause will pause the current track
  • :SpPrevious will move to the previous track
  • :SpNext will move to the next track
  • :Spotify or :SpToggle will toggle play/pause
  • :SpSearch <query> will search spotify for 'query' and return the results in a new buffer. While working in the Vimify buffer, the name, artist and album of all pertinent tracks will be displayed. Vimify's behavior in this buffer is described as follows::
    • <Enter>: If the cursor is over the name of the track, Spotify will begin playback of that track
    • <Enter>: If the cursor is over the name of the artist, Spotify will begin playback of all songs by artist, starting with popular
    • <Enter>: If the cursor is over the name of the album, Spotify will begin playback of the entire album
    • <Space>: Is bound to :SpToggle when working in the Vimify buffer

Installation

The preferred way to install vimify is to use pathogen. With pathogen installed, simply run

cd ~/.vim/bundle
git clone https://github.com/MuAnsari96/vimify

update March 2018: Vimify now requires authentication.

  1. Create a new spotify application at https://beta.developer.spotify.com/dashboard/applications
  2. Grab the Client Id and Client secret of your brand new spotify developer application
  3. Go to https://www.base64encode.org/ and paste your client id and secret like client:secret (don't forget the colon). Example:
afff3bbbdffff7ebclientID452855f9:afff3bbbdffff7secretfdfd452855f9
  1. Grab the encoded result to your clipboard and paste it in your vimrc like:
let g:spotify_token='YOURENCODEDRESULTHERE'
  • It's bit of an extra step to encode it, but safes code in the plugin, plus you won't be putting a hard-coded password in your env files (though a bas64 string is easy to spot and more than easy to reverse!!!!).

And you'll be good to go! Once help tags are generated, you can just run :help vimify in vim to see the manual.

Roadmap

  • Clean up the code and break things apart to their own sections / files
  • Instead of making a file that opens as an interface, push the whole thing to :copen (need to dig in some literature for that).
  • Make a setup interface that helps new users create a Authorisation: Basic token without having to read this readme or visiting shady encoding sites.
  • Your ideas and wishes.

vimify's People

Contributors

muansari96 avatar hendrikpetertje avatar kodai12 avatar dvdmuckle avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.