feat(mapping): add tab for opening/closing folds
This commit is contained in:
parent
98f079fb81
commit
b0f478ac92
@ -30,10 +30,14 @@ keymap({ "n", "v" }, "<Leader>y", '"+y', { noremap = true, silent = true, desc =
|
||||
keymap({ "n", "v" }, "<Leader>Y", '"+yg_', { noremap = true, silent = true, desc = "[Y]ank line to system clipboard" })
|
||||
keymap({ "n", "v" }, "<Leader>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 .. '<CR>', { noremap = true, silent = false })
|
||||
end
|
||||
-- tab for folds management
|
||||
keymap('n', '<Tab>', 'za', {noremap= true, silent = true, desc = 'Toggle open folds'})
|
||||
keymap('n', '<S-Tab>', 'zA', {noremap= true, silent = true, desc = 'Toggle open all folds'})
|
||||
|
||||
-- in :terminal esc exits edit mode
|
||||
keymap('t', '<Esc>', '<C-\\><C-n>', { noremap = true, silent = true })
|
||||
|
Loading…
x
Reference in New Issue
Block a user