reddit / emacs

How to show formatting characters only near the cursor?

moriturius · 2022-01-28 06:28
Some modern editors (like Obsidian) have this cool feature that when you navigate the cursor near formatted text it will show the formatting characters (like \*foo\*, /bar/) and otherwise just render them without showing the formatters. I was wondering how we can do something like this in Emacs. Is there any package for this or do you guys have any tips on how I could make such a thing?
art_else · 2022-01-28 07:13
I use org-appear for this.
moriturius · 2022-01-28 13:17
This seems to be exactly what I needed! Thank you! I'll go and test it :)
ThorstoneS · 2022-01-28 13:23
\`org-appear\` will do the normal formatting elements (and URLs). If you do use equations as well \`org-fragtog\` is the equivalent for maths LaTeX preview.
AlanYx · 2022-01-28 16:41
If you don't need the advanced functionality in org-appear, there's also a built-in option in Org to do this just with emphasis markers (like \*foo\*, /bar/): (setq org-hide-emphasis-markers t)
moriturius · 2022-01-29 05:35
Thanks for the reply. I actually used the option before but problem with it is that when they are hidden editing around them is sometimes funny. Org appear is exactly what I needed :)
moriturius · 2022-01-29 05:37
Thanks, my daily needs don't include using latex but I'm saving this for sure in case it changes :)