(Emacs+Org-Mode) Visualize Org Mode Plain List Bullets As Em-Dash

Org Mode plain lists uses the hyphen (minus sign) character as it’s default bullet. The hyphen is pretty wimpy compared to the Asterisk character so it can be hard to read. Here is some code to visualize it with an Em-Dash instead—so much easier to read!

(font-lock-add-keywords
 'org-mode
 '(("^[[:space:]]*\\(-\\) "
    0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "—")))))

Hyphen on the left and em-dash on the right

org_mode_plain_list_em-dash_bullets-off.png org_mode_plain_list_em-dash_bullets-on.png

Via jessicastringham via howardism. I made two changes: first don’t work on headline bullets and second match the first list bullet because it didn’t on my system.

You can use that code for any character not just em-dash

Leave a Reply

Your email address will not be published. Required fields are marked *