A vim plugin which allows users to hot reload previews of markdown in a browser as they save markdown files in vim.
:MarkdownPreview- Open the markdown preview in
$BROWSER.
- Open the markdown preview in
:MarkdownPreview requires that the mdpreviewd service is
running. See Installation for details.
All dependencies are public and available via pip.
| Dependencies | Integrations | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Plug 'kevr/vim-mdpreview', { 'do': './install.sh' }
With vim-plug, users do not need to do anything else. Just
:PlugInstall, open a markdown file, run :MarkdownPreview
and continue on to live previewing your vim markdown writes.
Run install.sh to automate a bunch of environment variable
configuration after installing pip to the local directory.
It'll also install a systemd service to $HOME/.config/systemd/user
which vim starts up for hot reload communication.
$ ./install.sh
Last but not least, put the ftplugin script in your ~/.vim:
$ mkdir -p ~/.vim/after/ftplugin
$ cp after/ftplugin/markdown.vim ~/.vim/after/ftplugin/
Now, opening a markdown file in vim will launch the mdpreviewd
service and writing one will update the preview.
There's just one configuration located at
example/mdpreviewrc which contains specific PATH
and PORT environment variables used by the mdpreviewd systemd service.
Before the service can successfully start,
example/mdpreviewrc must be located at
$HOME/.mdpreviewrc.
NOTE: It is suggested that this configuration file is not changed
other than the PORT variable. Installation through vim-plug and
other means set the path information up for you.
This project operates under the MIT Public License.
| Name | |
|---|---|
| Kevin Morris | [email protected] |