1.9 KiB
1.9 KiB
Previm
Vim plugin for preview.
###ScreenShot
Supported file formats
- Markdown
- support mermaid
- reStructuredText(required rst2html.py)
- textile
Dependencies
For conversion
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)
For open preview
No need for extra libraries or plug-ins.
It can, however, be integrated with open-browser.vim. For detailed usages, please see below.
Usage
- Define
g:previm_open_cmdin .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_cmdfor more details- You can skip this setting if you're using open-browser.
- Start editing the file of Markdown.(
filetypeismarkdown)- NOTE: In the case of
.md,filetypebecomes amodula2. If so, please describe in.vimrcthis setting
augroup PrevimSettings autocmd! autocmd BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} set filetype=markdown augroup END - NOTE: In the case of
- Run
:PrevimOpento open browser to preview - Back to Vim to edit your file
- Update the file, and the content for previewing will be updated automatically
mermaid
Support mermaid
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->E;
```

