Vim plugin for preview.
- Markdown
- reStructuredText(required rst2html.py)
- textile
- AsciiDoc
There is nothing essential in the case of textile and Markdown.
rst2html.py
is required in the case of reStructuredText.
It will become available rst2html.py
command when you install the docutils.
% pip install docutils
% rst2html.py --version
rst2html.py (Docutils 0.12 [release], Python 2.7.5, on darwin)
No need for extra libraries or plug-ins.
It can, however, be integrated with open-browser.vim. For detailed usages, please see below.
- Define
g:previm_open_cmd
in .vimrc- This command is used in terminal for opening your browser.
- For example, uses Safari on Mac
let g:previm_open_cmd = 'open -a Safari'
:help g:previm_open_cmd
for more details- You can skip this setting if you're using open-browser.
- Start editing the file of Markdown.(
filetype
ismarkdown
)- NOTE: In the case of
.md
,filetype
becomes amodula2
. If so, please describe in.vimrc
this setting
augroup PrevimSettings autocmd! autocmd BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} set filetype=markdown augroup END
- NOTE: In the case of
- Run
:PrevimOpen
to open browser to preview - Back to Vim to edit your file
- Update the file, and the content for previewing will be updated automatically
Support mermaid
```mermaid graph TD; A-->B; A-->C; B-->D; C-->E; ```