Skip to content

nine2/plantuml-previewer.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plantuml Previewer Vim

Vim/NeoVim plugin for preview PlantUML

image

Dependencies

Usage

  1. Start editing plantuml file in Vim
  2. Run :PlantumlOpen to open previewer webpage in browser
  3. Saving plantuml file in Vim, then previewer webpage will refresh

Commands

PlantumlOpen

Open previewer webpage in browser, and watch current buffer

PlantumlStart

Like PlantumlOpen, but won't open in browser

PlantumlStop

Stop watch buffer

PlantumlSave [filepath] [format]

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

Variables

g:plantuml_previewer#plantuml_jar_path

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('cat `which plantuml` | grep plantuml.jar'), '\v.*\s[''"]?(\S+plantuml\.jar).*'),
    \  1,
    \  0
    \)

g:plantuml_previewer#save_format

:PlantumlSave default format
Default: 'png'

g:plantuml_previewer#viewer_path

Custom plantuml viewer path
The plugin will copy viewer to here if the directory does not exist
And tmp.puml and tmp.svg will output to here

Related

About

Vim / Neovim plugin for preview PlantUML

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 92.6%
  • Vue 5.2%
  • Batchfile 0.6%
  • HTML 0.6%
  • Shell 0.6%
  • JavaScript 0.3%
  • CSS 0.1%