Home

Awesome

music.nvim

[!IMPORTANT]
I don't take time to update this, give a look at https://github.com/tamton-aquib/mpv.nvim

play music/video in neovim using mpv

Installation

  1. mpv

this plugin require mpv executable installed and discoverable in your PATH

  1. socat (interraction with mpv while playing playlist/music)
  1. voldikss/vim-floaterm (to run mpv)

see its github readme for how to install it on your neovim config (voldikss/vim-floaterm)

  1. bonus
  1. and, the plugin:
use {
	'Saverio976/music.nvim',
	run = ':MusicInstall',
	requires = { 'voldikss/vim-floaterm' }
}

Command

command! -nargs=1 -complete=file PlayMusic lua require('music_nvim').PlayMusicUrl([[<args>]])

open a terminal and run mpv to play only the sound

command! -nargs=1 -complete=file MusicPlay lua require('music_nvim').PlayMusicUrl([[<args>]])

open a terminal and run mpv to play only the sound

command! -nargs=1 -complete=file MusicPlayVideo lua require('music_nvim').PlayMusicVideoUrl([[<args>]])

open a terminal and run mpv to play the sound + video

command! MusicNext lua require('music_nvim').next_music()

pass to the next music (or stop it if not a playlist)

command! MusicPrev lua require('music_nvim').next_music()

pass to the previous music (if playlist)

command! MusicUnShuffle lua require('music_nvim').unshuffle_music()

shuffle the playlist

command! MusicUnShuffle lua require('music_nvim').unshuffle_music()

unshuffle the playlist

command! MusicQueue lua require('music_nvim').queue_music()

show queue

command! MusicAllPlaylist lua require('music_nvim').allplaylist_music()

show all the play list

Mpv Interraction (in the splited terminal) (man mpv for better info)

<details> <summary>click to see mpv basic interraction in the floating terminal</summary>

pause music

(same as <Space>)

pause music

(same as p)

go backaward/forward a little

go backaward/forward

pass to the next music (or stop music if not a playlist)

go to next music

go to last music

</details>

Thanks