From Stained Mockingbird, 1 Week ago, written in Plain Text.
  1.     fu! Mpv(...)
  2.  
  3.       :0,0s/^/#EXTM3U\r/
  4.       :silent! w! "$HOME/x"
  5.       "let list = "$HOME/x"
  6.       let list = a:0
  7.  
  8.       let mpv = ":!/usr/bin/mpv"
  9.       let alsahdmi = "--audio-device=alsa/hdmi:CARD=Generic,DEV=1"
  10.       "let ytdlopts = "--ytdl-format=\"(gif)[height<20]+wax-cylinder\"" " 127i is best format
  11.       let ytdlopts = "--ytdl-format=\"(mp4,webm)[height<720]+bestaudio\""
  12.       let insanity = "--load-unsafe-playlists"
  13.       "let leakypipe = bufname(line("."))
  14.       let leakypipe = list
  15.       let cr = "<cr>" " Ha as if thatd work. had ya goin tho
  16.  
  17.       let cmd = [ mpv, alsahdmi, ytdlopts, insanity, leakypipe, "
  18. "  ]
  19.       let call = join(cmd, " ")
  20.  
  21.       :echoerr call
  22.       :call feedkeys(call, "t")
  23.  
  24.     endfu
  25.     ":command -nargs=* Mpv :call Vimpv("<args>")
  26.     :command -nargs=1 Mpv :call Mpv("$HOME/x")
  27.     :cabbrev mp <c-r>=(getcmdtype()==':' && getcmdpos()==1 ? 'Mpv' : 'mp')<cr>
captcha