Sunday, December 22, 2019

Re: Export Vim screen with multiple vertical splits to HTML ?



On Saturday, December 21, 2019 at 4:21:46 AM UTC-6, Philip Rhoades wrote:
People,

I know about exporting Vim diffs to HTML but I have a situation where it
is convenient for me to look at a bunch of files in Vim each in a
vertical split.  Now while it is convenient for me to look at these
files this way, I cannot easily share this convenient view with other
(non-tech) people.  What I am thinking is that it would be nice to
export this view to HTML in the same way a diff view can be exported.  
The end result I guess would be multiple, side-by-side HTML divs that
are independently vertically scrollable.

Can anyone comment if this is doable? - perhaps as a Vim plugin?



This sounds easy enough to implement and probably useful in some situations.

It's not a current feature however.

There might be a wrapper for this, all you'd really need to do is create two divs with scrolling enabled via CSS, put them in a table with the desired layout (or use CSS), and copy the body of the generated HTML for each window into each area. Then copy the styles into the header. There might be some more adjustment needed for line number IDs, etc. depending on your options.

You can make a feature request here if you want (for now, I'll migrate issues when I find a new home for the repository): https://bitbucket.org/fritzophrenic/vim-tohtml

I have not had much time for development on the plugin recently but this is certainly a feature I'd consider adding. Not sure of the best UI for it though.

There was a similar plugin to TOhtml but it looks like that also has been inactive recently. I thought maybe they had a feature like this but I don't see it right away in the description: https://www.vim.org/scripts/script.php?script_id=3113

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7dd276b7-4cdc-44ed-a146-5bfbc30759b6%40googlegroups.com.

No comments:

Post a Comment