From 83eee3cb1a7bdba71fd302b227a9e01f14087385 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 4 Mar 2024 12:02:07 -0600 Subject: [PATCH] feat(nvim): support indent traverse in visual mode --- dots/.config/nvim/lua/core/mappings.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dots/.config/nvim/lua/core/mappings.lua b/dots/.config/nvim/lua/core/mappings.lua index f66779f3..412e2e61 100755 --- a/dots/.config/nvim/lua/core/mappings.lua +++ b/dots/.config/nvim/lua/core/mappings.lua @@ -96,8 +96,18 @@ M.setup = function() -- Binding to keep S-Space in terminals from not sending vim.keymap.set("t", "", "", { silent = true, desc = "Terminal: Hack S-Space to Space" }) - vim.keymap.set("n", "", indent_traverse(1, true), { silent = true, desc = "Move: To next equal indent" }) - vim.keymap.set("n", "", indent_traverse(-1, true), { silent = true, desc = "Move: To previous equal indent" }) + vim.keymap.set( + { "n", "v" }, + "", + indent_traverse(1, true), + { silent = true, desc = "Move: To next equal indent" } + ) + vim.keymap.set( + { "n", "v" }, + "", + indent_traverse(-1, true), + { silent = true, desc = "Move: To previous equal indent" } + ) -- Binding to go to older and newer quickfix list vim.keymap.set("n", "]q", "cnewer", { silent = true, desc = "Quickfix: Newer" })