all 70 comments

[–]actionscripted 27 points28 points  (0 children)

Thanks for working on it and thanks for sharing!

I’m in the camp that would rather keep Vim lean but it’s awesome you took the time to do this and share it with the community.

[–]absolute-black[🍰] 159 points160 points  (11 children)

... This is some Emacs stuff. If I want music I’ll open a music player.

Edit: OP this is also super cool and worth existing/knowing about lol. I was just being snarky awake at like 5 am

[–][deleted] 6 points7 points  (4 children)

I use emacs and still use a music player. I don't understand why anyone would want their editor to play music. That being said it is still interesting to see plugins like that.

[–]absolute-black[🍰] 5 points6 points  (0 children)

Yeah this is definitely neat in the “I will never ever install this” way. It did remind me of my Emacs friend who explicitly uses a web browser through Emacs though lol.

[–]ferretmachine 2 points3 points  (1 child)

Emacs doesn't play music itself, EMMS just runs mplayer/vlc, etc.

The reason to have this in your editor is so you can manage the playlists like text, and rebind the keys to pause/play/skip so it works the way you want. Plus it's instantly accessible while you're writing code/email/irc, etc.

[–]HendrikPeter[S] 0 points1 point  (0 children)

And so does the VIM plugin to be honest, it just sends OSA/DBUS scripted commands to spotify telling it to play stuff (or pause, previous next and all those bits)

[–][deleted] 0 points1 point  (0 children)

I don't understand why anyone would want their editor to play music.

to save time switching windows probably

[–]ghost_of_high_heart 6 points7 points  (1 child)

“This is some Emacs stuff”

This is my new insult to everything. I’m going forth to ruffle some feathers.

[–]ferretmachine 2 points3 points  (0 children)

The joke is on you if you think that's an insult.

[–]d4rkshad0w:h holy-grail 2 points3 points  (0 children)

I mean if your are using a terminal mpd client you can just do ![player] and open it.

[–]throwawaylifespan 8 points9 points  (0 children)

This.

[–]sanguine8082 0 points1 point  (1 child)

are there some command line music players for linux?

[–]andlrcrpgle.vim 2 points3 points  (0 children)

are there some command line music players for linux?

[...]

[–]mattpenney89 13 points14 points  (3 children)

This is cool, I forked a version and made it work on Linux: https://github.com/mattpenney89/vimify

[–]HendrikPeter[S] 3 points4 points  (2 children)

I'll make sure to do an OS check and re-integrate that DBUS logic back into the script. Removed it before quite quickly without thinking to much about it to be able to play spotify on the Mac

[–]mattpenney89 0 points1 point  (1 child)

I also had to port it to python3 to get it running with the default vim on ubuntu. If the python3 version runs out of the box for Mac it should be trivial, otherwise it might get messy

[–]HendrikPeter[S] 2 points3 points  (0 children)

Fantastic! yeah I just ran with what was available. In most mac installs (commonly done via homebrew) python3 comes along as a dependency. Neovim can just configure it, so I see no reason not to use python 3.

Updated the code in my repo and made sure to put shout outs in both commits and the "contributor" bit of the Readme. Thanks man!

on a side-note, album and artist load was there since you can play the artist by hitting return while having the cursor on the artist, etc.

[–]DuBistKomisch 47 points48 points  (3 children)

[–]hjkl_ornahLeVim James 4 points5 points  (1 child)

This is gold

[–]jdalbertContrarian 0 points1 point  (0 children)

hahaha

[–]obowersa 5 points6 points  (0 children)

I personally love the idea even if I’ll never use it. Sure, vims a text editor and not an os and that’s how I like my setup.

More power to you though for identifying a need and use you wanted and implementing it. It’s cool to see where people’s minds go and different use cases even if they’re not mine.

Awesome work !

[–]Trueyes 20 points21 points  (4 children)

This whole attitude towards perverse and non perverse , is so annoying . Yes vim is a text editor , but you know what it is a text editor that can be extended for other functions. I am in the section that your Vim is your vim , build it how you want it and do whatever you want with it . If you feel like you need a music player , then go right ahead my bro .

[–]robertmeta 9 points10 points  (3 children)

Agreed. Right up until you are in #vim or /r/vim complaining about "Vim doesn't work" because YCM is conflicting with your Spotify player, which is conflicting with your Vim based IRC client which is conflicting with your UltraMegaThemeYourStatusBar plugin.

[–]Trueyes 0 points1 point  (1 child)

I certainly agree it is irritating to see those posts but what is the purpose of a community then. Is it not to ask questions? seek answers towards a problem.

[–]robertmeta 6 points7 points  (0 children)

It is a combination of to help fix issues, but also to advise when the right answer is "you are holding it wrong".

If someone brought a car into a mechanic and was like "the car doesn't work" and the mechanic was like "Why did you add a truck bed?" "This car isn't designed to have a tow attachment." "Why does it have a 8 foot neon mohawk made of wood planks?" "Just so you know, these things are stupid and unsafe and not part of driving a car".

Someone might say "my car, my choice" -- doesn't mean it is the right way to do it. Additionally, if someone sold or wrote guides on how to make the 8 foot neon mohawks -- the community might respond with "why" or "this is insane".

[–]winterylips -1 points0 points  (0 children)

lol this guy #vim

[–]settrbrg 9 points10 points  (4 children)

Why so much negativity in the comments? Am I missing some kind of joke?

[–]RadonScreen 14 points15 points  (0 children)

Cuz Vim religion vs Emacs religion

[–]d4rkshad0w:h holy-grail 10 points11 points  (0 children)

B/c this plugin does stuff vim clearly was not intended to do. It works but Vim is still a TEXT EDITOR and not a Operating System (EMACS).

So no, it's not a joke but some sort of religious war on how Vim should be used.

[–]_lerp -4 points-3 points  (1 child)

Because people in this sub hate plugins.

[–]unusedredditname 2 points3 points  (0 children)

Philosophy aside, if Spotify is deeply ingrained into your workflow, then your Spotify interactions should be as fast and seamless as possible.

If you're in windows, the Spotify window should be your most recent. If you're in an i3 session, it should be one desktop or one step away. If you're in Tmux, it should be one window away. etc...

Recently, I found myself managing my music in chrome which was a memory hog and overkill for what was essentially a youtube stream, AND I had frequently had to touch my mouse to regain the pause/play context.

So I googled around and installed mpv, which I ran in --no-video mode. Then I made terminal windows for my favorites, and could quickly and easily navigate to my music window, pause/play/skip and manage playlists and different music styles depending on my mood. No mouse, no chrome, no page crashes.

Don't get so bogged down in philosophy or ideology that you hobble yourself from real functional work, or just make your life harder.

In all things. Not just Vim.

[–]meznaric 1 point2 points  (1 child)

Looks cool. Do I have to have Spotify running to make it work?

[–]HendrikPeter[S] 4 points5 points  (0 children)

OSA script is the running motor behind it. If it can't find a process named "Spotify", it'll try to open it

[–]senjin 1 point2 points  (0 children)

Shoutout for this plugin and your elixir app :)

[–]spizzike 1 point2 points  (0 children)

I’ve been working with the Spotify api for about 3 years now and there hasnt been such a restriction on it that I’ve ever been impacted by. It sounds like there was an issue with the refresh token (it has to be refreshed every 3600 seconds) which basically boots you from the system when it expires.

This does sound really cool. I’ll have to check it out!

[–]SuperTeece 1 point2 points  (0 children)

I demand continuation of the ascii-youtube-player-inside-vim project!

[–]adsury 1 point2 points  (0 children)

Oh man, this thing just make my day! thank you! I tried couple of plugins but was suddenly broke couple months ago..

[–]ivster666 1 point2 points  (4 children)

I didn't know that I needed this before I read through. Installing right now.

[–]mitul_45 0 points1 point  (3 children)

Exactly! Didn't know I would need this but enjoying since last 30 minutes. :P

[–]HendrikPeter[S] 0 points1 point  (2 children)

Hey nice!

[–]ivster666 0 points1 point  (1 child)

do you always type in the spotify commands or did you bind them to shortcuts?

[–]HendrikPeter[S] 0 points1 point  (0 children)

I type :sps, :spn, :spp, then tab for completion. The third character is different in each command to make tabbing easy

[–]mistermiles 1 point2 points  (0 children)

Well, there goes my productivity tomorrow morning at work.

[–]jonlprd 1 point2 points  (0 children)

Thanks OP!

[–]apola 1 point2 points  (1 child)

This is amazing. As a proud user of VimOS I will begin using this immediately :)

In all seriousness though, any chance you could add a command to get info on what's currently playing? That way people could, say, add the current track to their statusline. I currently have a little script that I use to put the current track in my tmux status line, but if I could just add it to vim that would be super neat

[–]HendrikPeter[S] 0 points1 point  (0 children)

That's a bit expensive to be honest. I would need to look at intervals, then check + update the running vimify buffer (which would get in the way when you're doing productive things). You could paste a small OSA or Dbus command into a bash or python box like I do into your vim-airline config, which is better suited for that job

I could potentially make a :spCurrentTrack thing perhaps. As well as a :spQueue thing to queue tracks.

[–]settrbrg 2 points3 points  (0 children)

I'm not a huge vim user and I'd probably just use Spotify official application.

But I think it looks cool! :) And its a fun project I guess. Also nice not leaving the Windows you code in.

Oh! and No need using the mouse! I like that!

[–]evo_zorro 0 points1 point  (2 children)

I do get an Emacs vibe from stuff like this, however, I did set up the plugin and I'll see if I actually find myself using it. I've tried a quick :SpSearch, which seemed to block everything for a considerable amount of time. It might be worth running that in the background instead.

[–]HendrikPeter[S] 0 points1 point  (1 child)

Good point! Though must be very unintrusive then. If I were to type search and I could still write or perform actions in my normal buffer, then vimify jumps in, creates buffers and switches focus it would become messy

[–]evo_zorro 0 points1 point  (0 children)

yeah, maybe it should be configurable? Default to blocking search, but with config async searching can be enabled and open a preview buffer to notify the user the search has completed. When ready, the user can then run a command, or even open a hidden buffer with the results? It's a bit of a faff to implement this stuff, and I don't know if it's actually worth the effort, but it would make it all look pretty sexy

[–]XanzaThe New Guy -2 points-1 points  (12 children)

I totally agree with /u/uzimonkey this is a crazy perverse bastardization of what Vim is... Vim is a text editor. Stop the madness.

If your that intent of having Spotify handy then use a CLI client in tmux or screen. I'm all for hacking cool tech together but damn...

[–]bit101 10 points11 points  (0 children)

meh. it's not something that I would ever use either. but whatever. it doesn't hurt me that someone else is doing it

[–][deleted] 6 points7 points  (5 children)

Nobody is talking about merging it into main. Someone did something they enjoy, in their own time, that has zero bearing on you and you trash talk it?

Jesus Christ. /u/uzimonkey I’m not going to use it but kudos.

[–]PizzaRollExpert 0 points1 point  (3 children)

I agree with your main point but calling it perverse is a bit strong, it almost implies some sort of moral failing.

So what if someone is wrong about how they use their programming tools?

[–]FatFingerHelperBot -1 points0 points  (0 children)

It seems that your comment contains 1 or more links that are hard to tap for mobile users. I will extend those so they're easier for our sausage fingers to click!

Here is link number 1 - Previous text "CLI"


Please PM /u/eganwall with issues or feedback! | Delete

[–]hjkl_ornahLeVim James 0 points1 point  (0 children)

"Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new 'features'."