Hacker News new | ask | show | jobs
by jeromenerf 1924 days ago
I just use emacs+evil for org only. Org is feature rich (bloated?) but these dynamic code blocks in documents are just too good.

I prefer vim for everything else and the general "minimalist" approach in particular. Emacs seems to appeal to people who like to do everything within one tool.

1 comments

I know org.mode is a deep rabbit hole - but do you have an example of "dynamic code blocks in documents"?

I've recently switched my "notes.txt" buffer in (neo)vim to markdown ("notes.md) - along with a slightly more magical syntax plug-in - and I'm pleasantly surprised by the quality of life improvements from having multiple code/script snippets highlighted in-line (eg: ```SQL (... Snippet...) ``` in a paragraph followed by some notes and a block of bash etc).

But I rarely execute the blocks in / from vim - I do a bit of copy-pasting though (I don't generally fit a terminal buffer/window in vim, I use a separate window with gnome-terminal or Sakura. I tried term-in-vim, but didn't quite like the flow. Maybe I should try again).

I made a video[0] showing off the power of org-babel, which is the part of org that lets you embed dynamic code blocks in your document. In the video I write a little essay[1] on how git stores data that has a lot of dynamic content that is managed by org. It's a bit like reproducible research or literate programming, but for me it's all about writing technical documents that are easy to keep consistent when things change.

[0]: https://www.youtube.com/watch?v=0g9BcZvQbXU

[1]: https://gitlab.com/spudlyo/public/-/blob/master/git.md

Thanks for this video, this is the one I link to when asked for a Babel demo.