A Vim / Neovim plugin for generating PlantUML diagrams from .puml files and opening them in your web browser.
- Generate PlantUML diagrams from the current buffer.
- Open the generated diagram in the default web browser.
- Share the PlantUML diagram using PlantUML Server.
- node-plantuml must be installed on your system.
- Ensure that the command
pumlis accessible from your terminal.
You can install vim-puml using your preferred plugin manager.
Using vim-plug
Add the following line to your .vimrc or init.vim:
Plug 'adirizka7/vim-puml'or init.lua:
Plug('adirizka7/vim-puml')Then run the following command:
:PlugInstall-
Open a
.pumlfile in Vim. -
Generate the PlantUML diagram.
:PUMLGenerate -
Open the generated diagram in your browser.
:PUMLOpen -
Share the PlantUML diagram. This will copy the share url to your clipboard (the
+register).:PUMLShare
Create a simple PlantUML file:
@startuml
Alice -> Bob: Hello
Bob -> Alice: Hi!
@enduml
- Save the file as
example.puml. - Run
:PUMLGenerate. - Then, run
:PUMLOpento view the diagram.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- PlantUML for the diagram generation.
- node-plantuml for the neat cli tool.
- Inspired by the Vim community and various plugins.