touch orgmode-babel.nvim.txt
This commit is contained in:
parent
24174247f7
commit
c3cbe4dddb
1 changed files with 148 additions and 0 deletions
148
doc/orgmode-babel.nvim.txt
Normal file
148
doc/orgmode-babel.nvim.txt
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
*orgmode-babel.nvim.txt* For NVIM v0.9.0 Last change: 2023 June 25
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *orgmode-babel.nvim-table-of-contents*
|
||||
|
||||
1. orgmode-babel.nvim |orgmode-babel.nvim-orgmode-babel.nvim|
|
||||
- Requirements |orgmode-babel.nvim-orgmode-babel.nvim-requirements|
|
||||
- Setup |orgmode-babel.nvim-orgmode-babel.nvim-setup|
|
||||
- Usage |orgmode-babel.nvim-orgmode-babel.nvim-usage|
|
||||
- Advanced Configuration|orgmode-babel.nvim-orgmode-babel.nvim-advanced-configuration|
|
||||
|
||||
==============================================================================
|
||||
1. orgmode-babel.nvim *orgmode-babel.nvim-orgmode-babel.nvim*
|
||||
|
||||
An experimental plugin that evaluates and tangles code blocks in nvim-orgmode
|
||||
<https://github.com/nvim-orgmode/orgmode> using babel
|
||||
<https://orgmode.org/worg/org-contrib/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
|
||||
<https://github.com/mrshmllow/BetterRecipeBook/assets/40532058/b1ca7384-4bb3-47d8-9148-b85f3a2ea54a>
|
||||
|
||||
|
||||
REQUIREMENTS *orgmode-babel.nvim-orgmode-babel.nvim-requirements*
|
||||
|
||||
- nvim-orgmode <https://github.com/nvim-orgmode/orgmode>
|
||||
- nvim-treesitter <https://github.com/nvim-treesitter/nvim-treesitter>
|
||||
- Neovim v0.9.0 or later
|
||||
- A working `emacs` installation (does not require configuration)
|
||||
|
||||
|
||||
SETUP *orgmode-babel.nvim-orgmode-babel.nvim-setup*
|
||||
|
||||
|
||||
LAZY.NVIM ~
|
||||
|
||||
>lua
|
||||
{
|
||||
"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 *orgmode-babel.nvim-orgmode-babel.nvim-usage*
|
||||
|
||||
All commands accept a `!` to skip confirmation.
|
||||
|
||||
|
||||
:ORGE[XECUTE] ~
|
||||
|
||||
Evaluates every block in buffer.
|
||||
|
||||
See Working with Source Code
|
||||
<https://orgmode.org/manual/Working-with-Source-Code.html> 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
|
||||
<https://orgmode.org/manual/Extracting-Source-Code.html> 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.
|
||||
|
||||
|
||||
:ORGT[ANGLE] [NAME] ~
|
||||
|
||||
Tangles `[name]` block.
|
||||
|
||||
|
||||
ADVANCED CONFIGURATION*orgmode-babel.nvim-orgmode-babel.nvim-advanced-configuration*
|
||||
|
||||
|
||||
ADDING EXTRA ORG-MODE LANGUAGES ~
|
||||
|
||||
Your emacs `init.el` will be sourced during execution of `:OrgExecute` and
|
||||
`:OrgTangle`, so packages you install there that provide extra babel languages
|
||||
will be available!
|
||||
|
||||
Follow the package's installation steps, and if they tell you to include it in
|
||||
`org-babel-load-languages`, additionally make sure that you include it in
|
||||
`opts.langs`.
|
||||
|
||||
1. Example
|
||||
|
||||
As an example, lets add ob-mermaid <https://github.com/arnm/ob-mermaid> for
|
||||
mermaid functionality in `orgmode-babel.nvim`!
|
||||
|
||||
First, lets create a `~/.emacs.d/init.el`.
|
||||
|
||||
>
|
||||
; ~/.emacs.d/init.el
|
||||
|
||||
; Add the melpa package manager
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/") t)
|
||||
(package-initialize)
|
||||
|
||||
; Install ob-mermaid
|
||||
(unless (package-installed-p 'ob-mermaid)
|
||||
(package-install 'ob-mermaid))
|
||||
<
|
||||
|
||||
Then, in our plugin configuration, we can add `mermaid` to our `opts.langs`.
|
||||
|
||||
>lua
|
||||
{
|
||||
"mrshmllow/orgmode-babel.nvim",
|
||||
...
|
||||
opts = {
|
||||
langs = { ..., "mermaid" }
|
||||
}
|
||||
},
|
||||
<
|
||||
|
||||
|
||||
|
||||
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
Loading…
Add table
Add a link
Reference in a new issue