Vivify icon indicating copy to clipboard operation
Vivify copied to clipboard

Switch to file endpoint

Open Tweekism opened this issue 1 year ago • 10 comments

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?

_Screencast from 2024-07-25 23-23-02

Tweekism avatar Jul 28 '24 14:07 Tweekism

Like I said, the way to implement this would probably be

  1. vivify.vim sends POST to vivify-server
  2. vivify-server sends message to clients at given path through existing websockets
  3. 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 :)

jannis-baum avatar Jul 28 '24 14:07 jannis-baum

Ah yeah, Sorry.

I tryed to create an issue from discussion for the SEO thing too, but it doesn't let me.

image

Clearly my GitHub-foo needs work 🫤

Tweekism avatar Jul 28 '24 14:07 Tweekism

Do you want me to create those 2 issues over there? Or would you prefer to do it?

Tweekism avatar Jul 28 '24 14:07 Tweekism

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.

jannis-baum avatar Jul 28 '24 14:07 jannis-baum

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

Tweekism avatar Jul 28 '24 14:07 Tweekism

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.

jannis-baum avatar Jul 28 '24 14:07 jannis-baum

Did he? I'll check.

Tweekism avatar Jul 28 '24 14:07 Tweekism

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

jannis-baum avatar Jul 28 '24 14:07 jannis-baum

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

jannis-baum avatar Sep 05 '25 06:09 jannis-baum

Btw on testing other plugins for #224, peek.nvim was one where this functionality felt very good,

but it's probably in part thanks to it using a webview window instead of a browser tab

Edit: I should try it again but with the option to use browser tabs instead

tuurep avatar Sep 05 '25 21:09 tuurep