hsingko / emacs-obsidian-excalidraw

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

Simple Plugin provides a bridge between emacs and obsidian-exlicalidraw, works both in orgmode and markdown.

demo.mp4

Requirements

Need obsidian-excalidraw plugin installed, and set Auto Export to svg(or png) images/Screenshot.png

Installation

Manually Install

(add-to-list 'load-path "[path-to-repo]")
(require 'emacs-obsidian-excalidraw)

Configurations

(setq emacs-obsidian-excalidraw-vault "[excalidraw vault name]")
(setq emacs-obsidian-excalidraw-vault-dir "[excalidraw file directory]")
(setq emacs-obsidian-excalidraw-image-format "png") ;; you should enable correspond format auto export in excalidraw

Usage

  • emacs-obsidian-excaliraw-create will create a excalidraw file in vault, then auto open in obsidian
  • after finishing your drawing in obsidian, Ctrl S to trigger auto export
  • M-x org-toggle-inline-images or M-x markdown-toggle-inline-images will display your image
  • if you want to edit the image, click on the drawing(or raw link), then M-x emacs-obsidian-excalidraw-open-at-point

Development todo list

  • [X] add png support
  • [X] add markdown file link support
  • [X] check multi-platform support: windows, mac
    • since using browse-url instead of browse-url-xdg-open to invoke obsidian, this methods should works cross platform
  • [X] open excalidraw directly without toggle link first
  • [ ] auto switch light/dark theme
  • [ ] auto redisplay image while file changed
  • [ ] support different excalidraw file directory other than root in obsidian

About


Languages

Language:Emacs Lisp 100.0%