-
-
Notifications
You must be signed in to change notification settings - Fork 233
Norg Text Objects
github-actions[bot] edited this page May 17, 2024
·
10 revisions
WARNING: Requires nvim 0.10+
- Easily move items up and down in the document
- Provides text objects for headings, tags, and lists
Users can create keybinds for some or all of the different events this module exposes. Those are:
those events are:
-
core.text-objects.item_up- Moves the current "item" up -
core.text-objects.item_down- same but down core.text-objects.textobject.heading.outercore.text-objects.textobject.heading.innercore.text-objects.textobject.tag.innercore.text-objects.textobject.tag.outer-
core.text-objects.textobject.list.outer- around the entire list
Movable "items" include headings, and list items (ordered/unordered/todo)
Example keybinds that would go in your Neorg configuration:
["core.keybinds"] = {
config = {
hook = function(keybinds)
-- Binds to move items up or down
keybinds.remap_event("norg", "n", "<up>", "core.text-objects.item_up")
keybinds.remap_event("norg", "n", "<down>", "core.text-objects.item_down")
-- text objects, these binds are available as `vaH` to "visual select around a header" or
-- `diH` to "delete inside a header"
keybinds.remap_event("norg", { "o", "x" }, "iH", "core.text-objects.textobject.heading.inner")
keybinds.remap_event("norg", { "o", "x" }, "aH", "core.text-objects.textobject.heading.outer")
end,
},
},-
core.integrations.treesitter- A module designed to integrate Treesitter into Neorg. -
core.keybinds- Module for managing keybindings with Neorg mode support.
core.autocommandscore.clipboardcore.clipboard.code-blockscore.completioncore.concealercore.defaultscore.dirmancore.dirman.utilscore.esupports.hopcore.esupports.indentcore.esupports.metagencore.exportcore.export.htmlcore.export.markdowncore.fscore.highlightscore.integrations.coq_nvimcore.integrations.nvim-cmpcore.integrations.nvim-compecore.integrations.treesittercore.iterocore.journalcore.keybindscore.latex.renderercore.looking-glasscore.neorgcmdcore.neorgcmd.commands.returncore.pivotcore.presentercore.promocore.qol.toccore.qol.todo_itemscore.queries.nativecore.scannercore.storagecore.summarycore.syntaxcore.tanglecore.tempuscore.text-objectscore.todo-introspectorcore.uicore.ui.calendar