>>108708075
>I didn't know that markdown-toggle-markup-hiding exists, wish I had known about this earlier.
>>108720425
>might be worth making it toggle together with normal/insert state change in evil
(defun evil-enable-markdown-markup-hiding (&rest args)
"If the current major mode is markdown-mode, enable markup hiding."
(interactive)
(when (derived-mode-p 'markdown-mode)
(markdown-toggle-markup-hiding 1)))
(defun evil-disable-markdown-markup-hiding (&rest args)
"If the current major mode is markdown-mode, disable markup hiding."
(interactive)
(when (derived-mode-p 'markdown-mode)
(markdown-toggle-markup-hiding -1)))
(advice-add #'evil-normal-state :after #'evil-enable-markdown-markup-hiding)
(advice-add #'evil-insert-state :after #'evil-disable-markdown-markup-hiding)
This should work for markdown-mode and any of its derivatives like gfm-mode.