Find a file
2023-06-30 13:11:30 +10:00
.github/workflows rm README.md 2023-06-25 17:10:10 +10:00
doc Auto generate docs 2023-06-27 08:36:35 +00:00
lua/orgmode-babel print cmd output in debug 2023-06-26 00:27:05 +10:00
LICENSE Create LICENSE 2023-06-25 16:34:16 +10:00
README.org temporarily remove misinformation 2023-06-30 13:11:30 +10:00

orgmode-babel.nvim

An experimental plugin that evaluates and tangles code blocks in nvim-orgmode using babel itself.

It uses emacs under the hood for perfect compatibility, but does not require you to add anything extra to your init.el.

Demonstration

Requirements

Setup

lazy.nvim

{
  "mrshmllow/orgmode-babel.nvim",
  dependencies = {
    "nvim-orgmode/orgmode",
    "nvim-treesitter/nvim-treesitter"
  },
  cmd = { "OrgExecute", "OrgTangle" },
  opts = {
    -- by default, none are enabled
    langs = { "python", "lua", ... }
  }
},

Usage

All commands accept a ! to skip confirmation.

:OrgE[xecute]

Evaluates every block in buffer.

See Working with Source Code in the org manual.

:{range}OrgE[xecute]

Evaluate every block in range.

:OrgE[xecute] [name]

Evaluate [name] block.

:OrgT[angle]

Tangles whole file.

See Extracting Source Code in the org manual.

:{range}OrgT[angle]

Tangles all blocks in range. If the range is NOT %, the tangled file will likely only contain the contents of the last block, which is expected behaviour.