GitHub - minad/org-modern: Modern Org Style
source link: https://github.com/minad/org-modern
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Modern Org Style
This package implements a “modern” style for your Org buffers using font locking
and text properties. The package styles headlines, keywords, tables and source
blocks. The styling is configurable, you can enable, disable or modify the style
of each syntax element individually via the org-modern
customization group.
The screenshots shows example.org with org-modern
turned on and off. The
elegant theme featured in the screenshot is modus-operandi.
This package is still early in its development, so expect bugs and issues in
particular due to unfortunate interactions of the variable-pitch
and fixed-pitch
fonts. Bug reports, improvement or style proposals are welcome! Maybe some more
Org elements deserve styling or alternative stylings should be offered?
The tag style of org-modern
is a poor Emacsien’s ripoff from Nicholas Rougier’s
beautiful svg-tag-mode. In contrast to svg-tag-mode
, this package avoids images
and uses cheap and fast Emacs box text properties. By only styling the text via
text properties, the styled text, e.g., dates or tags stay editable and are easy
to interact with.
On the downside, this restricts our flexibility and may lead to font-dependent
issues. We do our best, but for example there is no way we can round corners. Of
course a combination of org-modern
with svg-tag-mode
is possible. You can use
SVG tags and use the table and block styling from org-modern
. If you are
interested in further tweaks, Emacs comes with the builtin prettify-symbols-mode
which can be used for individual styling of custom keywords.
Another popular alternative is org-superstar, which has a more restricted
feature set and mainly adjusts headlines and lists. org-superstar
relies on
character composition, while org-modern
uses text properties, which are
considered more future-proof.
The package is not yet available in a package repository, so it must be
installed manually from this repository via package-install-file
. Then
org-modern
can be enabled manually by invoking M-x org-modern-mode
. In order to
enable org-modern
for all your Org buffers, add org-modern-mode
to the Org mode
hook list.
(add-hook 'org-mode-hook #'org-modern-mode)
Note that org-modern-mode
tries to adjust the tag label display based on the
value of line-spacing
. This looks best if line-spacing
has a value between 0.1
and 0.4 in the Org buffer.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK