Skip to content

Automatic inline image toggling as the cursor enters and exits them

License

Notifications You must be signed in to change notification settings

gaoDean/org-imgtog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Automatic inline image toggling as the cursor enters and exits them

Resources

License

Stars

Watchers

Forks