diff --git a/lua/neorg/modules/core/keybinds/keybinds.lua b/lua/neorg/modules/core/keybinds/keybinds.lua index 961ab5fbc..46bb3c26a 100644 --- a/lua/neorg/modules/core/keybinds/keybinds.lua +++ b/lua/neorg/modules/core/keybinds/keybinds.lua @@ -120,11 +120,10 @@ module.config.public = { { "", "core.tempus.insert-date-insert-mode", opts = { desc = "[neorg] Insert Date" } }, }, - -- TODO: Readd these - -- v = { - -- { ">>", ":Neorg keybind all core.promo.promote_range" }, - -- { "<<", ":Neorg keybind all core.promo.demote_range" }, - -- }, + v = { + { ">", "core.promo.promote_range", opts = { desc = "[neorg] Promote Objects in Range" } }, + { "<", "core.promo.demote_range", opts = { desc = "[neorg] Demote Objects in Range" } }, + }, }, { silent = true, noremap = true, diff --git a/lua/neorg/modules/core/promo/module.lua b/lua/neorg/modules/core/promo/module.lua index 537de757f..54656ccc0 100644 --- a/lua/neorg/modules/core/promo/module.lua +++ b/lua/neorg/modules/core/promo/module.lua @@ -320,38 +320,14 @@ module.on_event = neorg.utils.wrap_dotrepeat(function(event) local end_pos = vim.api.nvim_buf_get_mark(event.buffer, ">") for i = 0, end_pos[1] - start_pos[1] do - module.public.promote_or_demote(event.buffer, "promote", start_pos[1] + i) - end - - if modules.loaded_modules["core.concealer"] then - modules.broadcast_event( - assert( - modules.create_event( - modules.loaded_modules["core.concealer"], - "core.concealer.events.update_region", - { start = start_pos[1] - 1, ["end"] = end_pos[1] + 2 } - ) - ) - ) + module.public.promote_or_demote(event.buffer, "promote", start_pos[1] + i - 1, true, false) end elseif event.split_type[2] == "core.promo.demote_range" then local start_pos = vim.api.nvim_buf_get_mark(event.buffer, "<") local end_pos = vim.api.nvim_buf_get_mark(event.buffer, ">") for i = 0, end_pos[1] - start_pos[1] do - module.public.promote_or_demote(event.buffer, "demote", start_pos[1] + i) - end - - if modules.loaded_modules["core.concealer"] then - modules.broadcast_event( - assert( - modules.create_event( - modules.loaded_modules["core.concealer"], - "core.concealer.events.update_region", - { start = start_pos[1] - 1, ["end"] = end_pos[1] + 2 } - ) - ) - ) + module.public.promote_or_demote(event.buffer, "demote", start_pos[1] + i - 1, true, false) end end end)