For very many reference files, I am rather addicted to the combination of hi-lock
, text-mode
, and the very plain utility of TABs.
Here is a simple example. The file
hi-lock: (("===^^^===" (0 (quote compilation-line-number) t)))
hi-lock: (("http.?://.*" (0 (quote browse-url-button) t)))
===^^^===
===^^^===
Flutter Navigation
Routes and Navigation
Navigator https://api.flutter.dev/flutter/widgets/Navigator-class.html
Named Routes https://docs.flutter.dev/cookbook/navigation/named-routes
===^^^===
etc..
===^^^===
renders as follows.
This works nicely.
- I can insert lines to highlight the divisions between sections.
- I see HTTP links clearly highlighted (even if I still need to cut-and-paste to access them).
- The TABs, as mentioned, provide adequate "section" and "subsection" semantics.
- It's just text. This is not a trivial advantage, because my OS (macOS) indexes
.txt
files. There might be a way to nudge it to index other extensions. Still, the commands of any other file formats (as with, notably, LaTeX) will get in the way.
But there are also several problems.
- I need to manually maintain (an otherwise unnecessary)
hi-lock
header for each file. - I need to maintain regular expressions (though this can be fun for tricky cases).
- The semantics of
hi-lock
are dubious. (Why iscompilation-line-number
chosen for a separating line?) - Maintaining a reasonable color scheme becomes difficult after a few colors.
- Maintaining indentation with TABs is laborious (as you can see from the misalignment of the URLs).
Does org-mode solve these problems while maintaining the advantages of text-mode
and hi-lock
?
If you're comfortable with ORG, I would particularly like to see how the snippet above can be rendered in an equally—or better—looking way using ORG.
Related: