No description
  • Vim Script 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
yuuhikaze fb0bba3151 feat: updates README.md
- Includes instructions for installation with Lazy package manager
2025-04-21 08:12:25 -05:00
ftdetect Remove scriptencoding 2022-02-19 20:57:24 +09:00
ftplugin feat: converts to svg, then to pdf on :make 2025-04-21 07:38:52 -05:00
indent Remove scriptencoding 2022-02-19 20:57:24 +09:00
syntax Update syntax based on PlantUML 1.2024.5 2024-07-27 16:21:59 +09:00
LICENSE Add LICENSE file 2022-07-31 17:32:55 +09:00
README.md feat: updates README.md 2025-04-21 08:12:25 -05:00

Vim PlantUML Syntax/Plugin/FTDetect

Description

This is a vim syntax file for PlantUML.

The filetype will be set to plantuml for *.pu, *.uml, *.puml, *.iuml or *.plantuml files or if the first line of a file contains @startuml.

Additionally the makeprg is set to plantuml assuming you have this executable in your path. This file could contain something like

#!/bin/bash
java -jar $HOME/lib/java/plantuml.jar -tsvg $@

You can change the name of this file by setting g:plantuml_executable_script and disable this feature by setting g:plantuml_set_makeprg to 0.

See examples here: Plantuml Syntax.

Install

Packer

{
    'yuuhikaze/plantuml-syntax',
    ft = { 'puml', 'plantuml', 'uml', 'iuml' },
    config = function()
        vim.cmd([[autocmd BufRead,BufNewFile * if !did_filetype() && getline(1) =~# '@startuml\>'| setfiletype plantuml | endif]])
        vim.cmd([[autocmd BufRead,BufNewFile *.pu,*.uml,*.plantuml,*.puml,*.iuml set filetype=plantuml]])
    end
}