2 ms·
I use org mode. If you `(setq org-src-fontify-natively t)` in your org-mode hook it will render code blocks with that language's display settings, which helps
by andreareina 10y ago
I use org mode.
If you `(setq org-src-fontify-natively t)` in your org-mode hook it will render code blocks with that language's display settings, which helps a lot.
For two side-by-side buffers, left for code right for notes:
* left: `M-x clone-indirect-buffer`
* either: `M-x scroll-all-mode`
* right: `M-x fixme-mode`[1]
The idea is that you abuse the highlighting of FIXME/TODO comments (in the right buffer only) and put your notes there. Scrolling is synced so both buffers are always looking at the same view. It's a bit of a kludge but has the advantage over org-mode that it's easier to add the notes.
EDIT: If you cared enough about it you could write a simple major mode for the right pane that highlights all comments[2] so you don't need the FIXME prefix. As a bonus you could also grey out the actual code.
[1] https://www.emacswiki.org/emacs/FixmeMode https://www.emacswiki.org/emacs/FixmeMode
[2] http://ergoemacs.org/emacs/elisp_comment_coloring.html http://ergoemacs.org/emacs/elisp_comment_coloring.html
- morbidhawk 10y agoThis looks like a very feasible approach, I didn't realize you could lock scrolling for side-by-side buffers. That's really awesome. I'll have to give this a try