Skip to content

Instantly share code, notes, and snippets.

@webgyo
Last active March 7, 2024 11:01
Show Gist options
  • Select an option

  • Save webgyo/b91d0e9e266e393b117bf4cc9880072f to your computer and use it in GitHub Desktop.

Select an option

Save webgyo/b91d0e9e266e393b117bf4cc9880072f to your computer and use it in GitHub Desktop.
SublimeText3からPlantUMLを使う #mac #plantuml #sublimetext

1.brewで以下のパッケージをインストール

参考サイト PlantUMLをMac OS Xで使う
https://qiita.com/kohashi/items/1d2c6e859eeac72ed926

brew install graphviz
brew install plantuml

SublimeText3からPlantUMLを使う
https://qiita.com/positrium/items/bb22465e9de698fc2979 上記サイトで記載されているbrew installで古いOSXはサポートしておらずエラーになるので上記の方法でbrew installする

2.PlantUML pluginをsublimeにインストール

参考サイト Sublime Text PlantUMLのplugin について.md https://gist.github.com/kemsakurai/063d4255994c637d68dc61022f279f44

PlantUML pluginをインストール


画像を出力させるファイルを開いてCommand+Mで画像が同じフォルダに作成される

3.シンタックスハイライトの設定 PlantUML pluginはデフォルトで[wsd, uml, puml]の拡張子しかシンタックスしていない。 そのためそれ以外の拡張子のときは別途設定が必要になる

Sublime Textで特定の拡張子にデフォルトのシンタックスを紐付ける https://qiita.com/muyuu/items/658113b1b381f473a073

View -> Syntax -> Open All with current extension asに先ほどインストールしたsublime_diagram_pluginで 設定できるシンタックス「Diagram」があるのでその中の「DiagramEx」を選択する これで[wsd, uml, puml]と同様のシンタックスが適用される ※「DiagramEx」を選択するのはsublime_diagram_pluginで[wsd, uml, puml]に「DiagramEx」シンタックスを適用するようにしているため

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment