aliquote.org

Org in Vim

January 6, 2022

It’s been a few years since I last discussed the benefits of using Org rather than, say, Markdown. In short, the syntax is cleaner, it add further structural editing elements (like example, verse, etc.), it adds Babel code block (which works quite well under Emacs), Org tables are easier to manage than Markdown or Pandoc ones, and it is well interfaced with Pandoc. And for those who like GTD and stuff like that it has its own agenda and appointment management tool chain.

I wrote my last post about it when I stopped using Emacs full time.1 At this time, there were two competitors to Emacs org-mode in Vim: vim-orgmode and vimwiki. These plugins were surely not as powerful as org-mode, and neither provided agenda-like or code block facilities. I ended up writing Org mode as I do write Markdown, as plain text. Now, things have changed a little as far as Markdown is concerned since a Treesitter parser has been made available. And today I just came across orgmode, which is specifically designed for Neovim users and relies on Treesitter for the most part.

I installed this plugin alongside vim-table-mode, and everything works as advertised. I didn’t tested the agenda facilities since I no longer rely on it in my daily workflow.2 In particular, I like the fact that I get automatic folding as one would expect when working with Emacs. I do not use the concealing feature for links and other emphasized pieces of text, but they look to work too, provided you set conceallevel=2 in your config or from the command line when editing your file. For editing purpose at least, it is enough for me. Below is a screenshot of my Vim 101 tutorial, which I wrote in Emacs two years ago.

orgmode

If you take a look at the online help for orgmode, you will soon notice that it focus on agenda functionalities. I hope that automatic evaluation of code blocks will be integrated soon. I tried sniprun breifly in the afternoon, and although it is very approachable and it provides a concise way to evaluate code block and displaying results using modern features like virtual text, it does not support Lisp-like PLs (Common Lisp, Scheme or Clojure). We’ll see how it goes then. In the meantime, the vim-table-mode is a killer feature since it even works for any filetype in Vim.

This is my first post of the year, by the way. Happy new year to all of you!

♪ Camille Berthollet & Julie Berthollet • The Leftovers, Suite


  1. See also Emacs Org and Tufte handout, Org custom CSS, or Org exports↩︎

  2. I’ve been using Org agenda for two years, and I used to manage everything (meeting notes, projects tasks and TODO lists, appointments) in Emacs using org-mode. Then I realized once again that GTD and workflow like that are definitely not for me. A simple TODO list in plain text and Changelog are enough for me, together with Git history. ↩︎

See Also

» Neovim wrap up (6/n) » Vim on steroid (5/n) » Neovim useful plugins (4/n) » Neovim and LSP (3/n) » Custom Vim shortcuts (2/n)