ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Mermaid

by SublimeText ST3

:tropical_fish: The Sublime Text package for Mermaid diagrams

Details

  • 0.4.0
    0.3.0
  • github.​com
  • github.​com
  • 9 months ago
  • 13 minutes ago
  • 7 years ago

Installs

  • Total 6K
  • Win 2K
  • Mac 3K
  • Linux 818
Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6
Windows 0 0 1 2 2 0 0 0 1 1 3 2 2 1 0 1 2 3 2 3 0 0 2 3 2 1 1 0 1 2 0 1 2 1 0 0 0 1 2 0 1 0 0 1 2 0
Mac 1 2 1 3 4 2 0 0 2 3 4 0 2 3 0 0 6 1 2 2 0 3 0 2 2 6 1 2 0 4 3 0 0 1 0 0 1 0 1 6 1 0 0 1 5 1
Linux 0 0 2 0 0 0 1 0 1 0 0 1 3 0 0 1 0 3 0 0 1 0 0 2 0 1 0 1 1 0 1 0 2 1 0 0 2 0 2 0 1 0 0 3 0 1

Readme

Source
raw.​githubusercontent.​com

Mermaid (for Sublime)


:tropical_fish: The Sublime Text package for Mermaid diagrams.

Install Mermaid from Package Control.

Install Mermaid CLI if you haven't already, and ensure it is on your PATH.

screen-shot

screen-shot

Error: language “mermaid” is not supported
graph TB %% tab completion: 'graph'
  ID-1[Node 1] %% tab completion: 'node'
  ID-2>Node 2]
  ID-3(Node 3)
  ID-1---ID-2 %% tab completion: 'link'
  ID-1 --> ID-3
  ID-2--Link between 2 and 3---ID-3
  ID-3-->|Action from 3 to 1|ID-1
  ID-3 -- "Action from 3 to 2. p/w: '_-!#$%^&*+=?,\'" --> ID-2
  %% tab completion: 'class'
  classDef blue fill:#08f,stroke:#008
  class ID-1 blue
  %% tab completion: 'click'
  click ID-1 "https://github.com" "Tooltip text"
  click ID-2 alert "Tooltip for a callback"
  subgraph A subgraph
    ID-4{Node 4}
    ID-5((fa:fa-spinner))
    ID-6["Node 6 (same #quot;shape#quot;)"]
    ID-4-.->ID-5
    ID-5 -. Action from 5 to 4 .-> ID-4
    ID-5==>ID-6
    ID-6 == Action from 6 to 5 ==> ID-5
  end %% tab completion: 'subgraph'
  • x[] support

screen-shot

screen-shot

Error: language “mermaid” is not supported
sequenceDiagram %% tab completion: 'diagram'
  %% tab completion: 'participant'
  participant A as Alice
  participant B as Bob
  participant C as Carol
  %% tab completion: 'note'
  Note left of A: Alice likes to chat
  %% tab completion: 'msg'
  A->B: Hello Bob, how are you?
  loop Healthcheck
    B->B: Bob checks himself...
  end %% tab completion: 'loop'
  Note over B: Bob whispers when sick
  alt is sick
    B-->A: Not so good :(
  else is well
    B->A: Feeling fresh like a daisy
  end %% tab completion: 'alt'
  opt Extra response
    B->A: You, Alice?
  end %% tab completion: 'opt'
  Note right of C: Carol is the boss
  C->>A: Get back to work!
  loop Every hour
    A->>B: Request 1
    %% tab completion: 'activate'
    activate B
    A-x+B: Request 2
    B--x-A: Response 2
    B-->>A: Response 1
    deactivate B
  end

Development:

# Remove package.
$ my_project_path=~/Projects/sublime-mermaid
$ my_packages_path=~/Library/Application\ Support/Sublime\ Text\ 3/Packages
$ ln -s "$my_project_path" "$my_packages_path/Mermaid"
$ cp "$my_project_path/tests/syntax_test_mermaid.mermaid" "$my_packages_path/Default"
# Develop...
$ rm "$my_packages_path/Default/syntax_test_mermaid.mermaid"
$ rm "$my_packages_path/Mermaid"
# Install package.