Metagen
github-actions[bot] edited this page Mar 25, 2024
·
356 revisions
The metagen module automatically places relevant metadata at the top of your .norg
files.
The metagen module exposes two commands - :Neorg inject-metadata
and :Neorg update-metadata
.
- The
inject-metadata
command will remove any existing metadata and overwrite it with fresh information. - The
update-metadata
preserves existing info, updating things like theupdated
fields (when the file was last edited) as well as a few other non-destructive fields.
-
(boolean)
Whether or not to call
:h :undojoin
just before changing the timestamp inupdate_metadata
. This will make your undo key undo the last change before writing the file in addition to the timestamp change. This will move your cursor to the top of the file. For users with an autosave plugin, this option must be paired with keybinds for undo/redo to avoid problems with undo tree branching:["core.keybinds"] = { config = { hook = function(keybinds) keybinds.map("norg", "n", "u", function() require("neorg.modules.core.esupports.metagen.module").public.skip_next_update() local k = vim.api.nvim_replace_termcodes("u<c-o>", true, false, true) vim.api.nvim_feedkeys(k, 'n', false) end) keybinds.map("norg", "n", "<c-r>", function() require("neorg.modules.core.esupports.metagen.module").public.skip_next_update() local k = vim.api.nvim_replace_termcodes("<c-r><c-o>", true, false, true) vim.api.nvim_feedkeys(k, 'n', false) end) end, }, },
false
-
core.autocommands
- Handles the creation and management of Neovim's autocommands. -
core.integrations.treesitter
- A module designed to integrate Treesitter into Neorg.
core.autocommands
core.clipboard
core.clipboard.code-blocks
core.concealer
core.defaults
core.esupports.indent
core.esupports.metagen
core.export
core.export.markdown
core.fs
core.highlights
core.integrations.nvim-cmp
core.integrations.nvim-compe
core.integrations.treesitter
core.itero
core.keybinds
core.latex.renderer
core.looking-glass
core.manoeuvre
core.mode
core.neorgcmd
core.neorgcmd.commands.return
core.pivot
core.presenter
core.promo
core.qol.toc
core.qol.todo_items
core.queries.native
core.scanner
core.storage
core.summary
core.syntax
core.tangle
core.tempus
core.ui
core.ui.calendar