Skip to content

ernestre/vim-spotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-spotify

Get information about currently playing song on spotify.

Install

Install the plugin using your favorite plugin manager:

Vundle:

Plugin 'ernestre/vim-spotify'

Plug:

Plug 'ernestre/vim-spotify'

dein:

call dein#add('ernestre/vim-spotify')

Requirements

  • vim compiled with python3
  • Currently only works on linux

Configuration

There are some variables which you can modify in order to change the playback text:

let g:vim_spotify_playback_pattern = "{playbackIcon}{artist} - {title}"
let g:vim_spotify_icon_play = "⏯️"
let g:vim_spotify_icon_pause = "⏸️"

g:vim_spotify_playback_pattern variable has three placeholders which can change however you like:

  • let g:vim_spotify_playback_pattern = "{playbackIcon} > {artist} - {title}"
  • let g:vim_spotify_playback_pattern = "{artist} {title} "
  • let g:vim_spotify_playback_pattern = "{artist}:{title} | {playbackIcon} 🎶"

Note: Default values are using fontawesome icons, so you might want to install vim-devicons

Integration with lightline.vim

This plugin has a SpotifyPlayback function, which returns information about currently playing song on spotify. In order to show this information in the statusline, add a component function to your lightline configuration:

let g:lightline = {
      \ 'active': {
      \   'left': [ [ 'mode', 'paste', 'spotify'],
      \             [ 'readonly', 'filename', 'modified'] ]
      \ },
      \ 'component_function': {
      \   'spotify': 'SpotifyPlayback',
      \ },
      \ }

Releases

No releases published

Packages

No packages published