Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them
Org mode
supports
inline image previews
of
LaTeX fragments.
These can be toggled with C-c C-x C-l . org-fragtog
automates this, so fragment previews are disabled for editing when your cursor steps onto them, and re-enabled when the cursor leaves.
Install and load the package, then add the snippet below to your config.
(add-hook 'org-mode-hook 'org-fragtog-mode)
Although this package uses Org mode’s fragment preview feature, it should work with anything that uses the same fragment syntax, such as Markdown files or formulas in code comments.