Vim/NeoVim plugin for preview PlantUML
- Java
- Graphviz (https://www.graphviz.org/download/)
- brew install graphviz
- apt-get install graphviz
- open-browser.vim
- aklt/plantuml-syntax (vim syntax file for plantuml)
- Start editing plantuml file in Vim
- Run
:PlantumlOpen
to open previewer webpage in browser - Saving plantuml file in Vim, then previewer webpage will refresh
Open previewer webpage in browser, and watch current buffer
Stop watch buffer
Export uml diagram to file path
Available formats
png, svg, eps, pdf, vdx, xmi, scxml, html, txt, utxt, latex
Example:
:e diagram.puml
:PlantumlSave
:PlantumlSave diagram.png
:PlantumlSave diagram.svg
Custom plantuml.jar file path
If plant uml was installed by homebrew, you can add the following code to your .vimrc
to use the version installed by homebrew:
au FileType plantuml let g:plantuml_previewer#plantuml_jar_path = get(
\ matchlist(system('grep plantuml.jar /usr/local/bin/plantuml'), '\v.* (\S+plantuml\.jar).*'),
\ 1,
\ 0
\)
:PlantumlSave
default format
Default: 'png'