Just found a quick way to have tags always right aligned, taking advantage of font-lock and display property.
(add-to-list 'font-lock-extra-managed-props 'display)
(font-lock-add-keywords 'org-mode
`(("^.*?\\( \\)\\(:[[:alnum:]_@#%:]+:\\)$"
(1 `(face nil
display (space :align-to (- right ,(length (match-string 2)) 3)))
prepend))) t)
You must log in or register to comment.