Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.33 KB

README.org

File metadata and controls

30 lines (24 loc) · 1.33 KB

org-imgtog

Automatic inline image toggling as the cursor enters and exits them, similar to org-fragtog.

About

Org mode supports inline image previews. These are annoying to edit, since you either have to blindly press delete on the image and hope that destroys the inline image preview, or toggle the entire file. org-imgtog provides the functionality to toggle just the one you’re editing when your cursor goes on it.

org-imgtog.mp4

Install

use-package

(use-package org-imgtog
  :straight (org-imgtog :type git :host github :repo "gaoDean/org-imgtog")
  :hook org-mode)

Manual

(add-to-list 'load-path "/path/to/plugin/")
(require 'org-imgtog)
(add-hook 'org-mode-hook 'org-imgtog-mode)

For users of remote inline images

This is only for users who do not turn on caching. To turn on caching, just set the variable url-automatic-caching to true. If not, it would be benificial to add the following as the image would be fetched every time it is hidden.

(setq org-imgtog-preview-delay 0.5) ;; wait 0.5 seconds before toggling
(setq org-imgtog-preview-delay-only-remote t) ;; only delay for remote images