Comments (4)
The meat of the logic is in the backend code: http://github.com/suan/instant-markdown-d Do you want an explanation on that, this vim plugin, or both?
Also, if you're diving into the code cause of instability issues, I'm aware of those, and am working on a more stable and flexible backend which will also be in pure ruby (easier to install) You can follow the progress here: https://github.com/suan/instant-markdown-d/tree/rate_limiting
from vim-instant-markdown.
I'm just curious about the communication between the three parts, vim, the browser and the node instance. How is that set up?
from vim-instant-markdown.
It's roughly like this:
- When you open a markdown file in vim, it starts the backend server
- when the backend server starts, it opens a browser tab and a websocket connection
- When the buffer for the markdown file is changed in vim, the plugin sends a PUT request to the server with the new markdown content
- The server converts to to HTML and sends it over the websocket
- The javascript in the browser tab replaces the old HTML content with the new one
- When you close/leave the vim buffer, it sends a DELETE request to the server
- The server sends a message over the websocket it to close the browser tab, and then shuts itself down
from vim-instant-markdown.
Nice!
from vim-instant-markdown.
Related Issues (20)
- firefox doesn't honor -p flag with vim-instant-markdown HOT 1
- Can't Follow link in the preview page HOT 2
- content security policy - scripts are blocked HOT 2
- autoscroll does not work HOT 5
- always get EOF in browser. HOT 2
- :InstantMarkdownPreview fail to pops up the preview page after reopen markdown file HOT 1
- Can not work in tmux
- Lack of smdv usingโs explanation HOT 1
- autoclose on exit from file HOT 2
- Crash on defining HOT 1
- [Feature Request] Blocklist certain paths/patterns HOT 5
- How to start it when autostart is off HOT 1
- Document support for vim8 build-in package manager users HOT 1
- Auto scroll marker html tag inside latex formulas causes TeX parse error HOT 7
- How to invoke mathjax? HOT 5
- Include in Neovims `plugins-setup.lua` to use it with Packer package manager HOT 3
- Render error while typing HOT 2
- cant configure proper options for g:instant_markdown_browser HOT 7
- Provide Plantuml Support HOT 4
- Neovim-first Lua rewrite of the plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-instant-markdown.