All Projects → abrochard → Mermaid Mode

abrochard / Mermaid Mode

Licence: gpl-3.0
Emacs major mode for working with mermaid graphs https://mermaidjs.github.io/

Labels

Projects that are alternatives of or similar to Mermaid Mode

Graphql.el
GraphQL utilities
Stars: ✭ 50 (-16.67%)
Mutual labels:  emacs
Ivy Yasnippet
Preview yasnippet snippets with ivy
Stars: ✭ 53 (-11.67%)
Mutual labels:  emacs
Emacs Document
translate emacs documents to Chinese for convenient reference
Stars: ✭ 1,085 (+1708.33%)
Mutual labels:  emacs
Org Evil
Evil extensions for Org-mode.
Stars: ✭ 51 (-15%)
Mutual labels:  emacs
Mwim.el
Move to the beginning/end of line, code or comment
Stars: ✭ 51 (-15%)
Mutual labels:  emacs
Org Make Toc
Automatic tables of contents for Org files
Stars: ✭ 53 (-11.67%)
Mutual labels:  emacs
Counsel Spotify
Control Spotify App through Emacs
Stars: ✭ 49 (-18.33%)
Mutual labels:  emacs
Vscode Org Mode
Emacs Org Mode for Visual Studio Code
Stars: ✭ 1,096 (+1726.67%)
Mutual labels:  emacs
Remacs
Emacs style editor written in Racket
Stars: ✭ 52 (-13.33%)
Mutual labels:  emacs
.emacs.d
My emacs config
Stars: ✭ 56 (-6.67%)
Mutual labels:  emacs
Emacs.g
The Emacs Collective
Stars: ✭ 51 (-15%)
Mutual labels:  emacs
Good Scroll.el
Attempt at good pixel-based smooth scrolling in Emacs
Stars: ✭ 52 (-13.33%)
Mutual labels:  emacs
Lsp Javascript
Stars: ✭ 55 (-8.33%)
Mutual labels:  emacs
Indium
A JavaScript development environment for Emacs
Stars: ✭ 1,058 (+1663.33%)
Mutual labels:  emacs
.dot Org Files
Dotfiles, Emacs + Org-mode with babel and Literate programming.
Stars: ✭ 57 (-5%)
Mutual labels:  emacs
All The Icons.el
A utility package to collect various Icon Fonts and propertize them within Emacs.
Stars: ✭ 1,048 (+1646.67%)
Mutual labels:  emacs
Emacs Fish Completion
[MOVED TO GITLAB]
Stars: ✭ 53 (-11.67%)
Mutual labels:  emacs
Emacs Themes Site
Source code for https://emacsthemes.com
Stars: ✭ 58 (-3.33%)
Mutual labels:  emacs
Comb
Interactive code auditing and grep tool in Emacs Lisp
Stars: ✭ 58 (-3.33%)
Mutual labels:  emacs
Org Tfl
Transport for London meets Emacs Orgmode
Stars: ✭ 55 (-8.33%)
Mutual labels:  emacs

MELPA

mermaid-mode

Emacs major mode for working with mermaid graphs

Screenshot

Thumbnail

Installation

  1. Install from Melpa or load the mermaid-mode.el file
  2. Install mmdc binary from the mermaid.cli project if you plan to compile graphs in Emacs

Usage

Currently supporting flow charts and sequence diagrams with syntax coloring and indentation.

C-c C-c - compile current file to an image
C-c C-f - compile given file to an image
C-c C-b - compile current buffer to an image
C-c C-r - compile current region to an image
C-c C-o - open in the live editor
C-c C-d - open the official doc

Note: All compile commands will open the output in a buffer to view the resulting image.

Customization

You can specify the location of mmdc with the variable mermaid-mmdc-location, the default assumes you have the binary in your PATH (and for that you probably want/need to install mermaid.cli).

By default mmdc will compile to png format. You can change that by setting the variable mermaid-output-format.

By default mermaid-tmp-dir points to \tmp\. Feel free to set it to a more appropriate location that works for you (e.g. on windows).

To customize the key bindings but this into your init.el ...

(setq mermaid-mode-map
  (let ((map mermaid-mode-map))
    (define-key map (kbd "C-c C-c") nil)
    (define-key map (kbd "C-c C-f") nil)
    (define-key map (kbd "C-c C-b") nil)
    (define-key map (kbd "C-c C-r") nil)
    (define-key map (kbd "C-c C-o") nil)
    (define-key map (kbd "C-c C-d") nil)
    (define-key map (kbd "C-c C-d c") 'mermaid-compile)
    (define-key map (kbd "C-c C-d c") 'mermaid-compile)
    (define-key map (kbd "C-c C-d f") 'mermaid-compile-file)
    (define-key map (kbd "C-c C-d b") 'mermaid-compile-buffer)
    (define-key map (kbd "C-c C-d r") 'mermaid-compile-region)
    (define-key map (kbd "C-c C-d o") 'mermaid-open-browser)
    (define-key map (kbd "C-c C-d d") 'mermaid-open-doc)
    map))

Bugs & Issues

Feel free to open an issue!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].