Switch to file endpoint
Discussed in https://github.com/jannis-baum/Vivify/discussions/123
Originally posted by Tweekism July 25, 2024 Is there any appetite for an option that makes vivify follow you when you switch buffers?
Like I said, the way to implement this would probably be
- vivify.vim sends POST to vivify-server
- vivify-server sends message to clients at given path through existing websockets
- client reacts to message by running vanilla client-side JS in the browser that opens the new page on the same tab.
I.e. the same way the scrolling and buffer-updating works right now as well!
That said, the issue here on main Vivify will be to implement the endpoint for the POST request and the client-side opening of the new page. The actual "follow on buffer switch" is an issue for the vivify.vim repo :)
Ah yeah, Sorry.
I tryed to create an issue from discussion for the SEO thing too, but it doesn't let me.
Clearly my GitHub-foo needs work 🫤
Do you want me to create those 2 issues over there? Or would you prefer to do it?
No worries!
Do you want me to create those 2 issues over there? Or would you prefer to do it?
You go! What's the second issue though? Aside from the one that will use the new endpoint to change the viewer after switching buffers.
First action item so far: Mention "Markdown" more in the description of the Vim plugin (people seem to look more for Vim plugins than standalone viewers because they don't come up with the idea of a standalone viewer)
^^ This one
Aaaah okay! Hm, not sure. I think Tuure and I already did that to some extent. If you think there is more to adjust then feel free to open the issue though.
Did he? I'll check.
Clearly my GitHub-foo needs work 🫤
This was probably because you're not a collaborator over on that repo yet. I'll invite you there as well, maybe it'll work then
With this it might also be cool to add a "single tab mode" as a config option where running viv will just switch all clients to the given file instead of opening a new one