From b0f478ac92d03a8840b9015966573554f218ebb3 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Sun, 23 Mar 2025 12:19:40 +0100 Subject: [PATCH] feat(mapping): add tab for opening/closing folds --- lua/mappings.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/mappings.lua b/lua/mappings.lua index 2f8a08d..41b2406 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -30,10 +30,14 @@ keymap({ "n", "v" }, "y", '"+y', { noremap = true, silent = true, desc = keymap({ "n", "v" }, "Y", '"+yg_', { noremap = true, silent = true, desc = "[Y]ank line to system clipboard" }) keymap({ "n", "v" }, "p", '"+p', { noremap = true, silent = true, desc = "[P]ast from system clipboard" }) +--[[ Folds ]] -- z0…z9 to open folds to a certain level for i = 0, 9 do keymap('n', 'z' .. i, ':set fdl=' .. i .. '', { noremap = true, silent = false }) end +-- tab for folds management +keymap('n', '', 'za', {noremap= true, silent = true, desc = 'Toggle open folds'}) +keymap('n', '', 'zA', {noremap= true, silent = true, desc = 'Toggle open all folds'}) -- in :terminal esc exits edit mode keymap('t', '', '', { noremap = true, silent = true })