Compare commits

...

2 Commits

View File

@ -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 })
@ -61,11 +65,12 @@ keymap('n', '<leader>slf', ':set spelllang=fr<CR>',
-- Toggle hlsearch
keymap({ 'n', 'v' }, '<C-l>', ':set hlsearch!<CR>', { silent = true, noremap = true })
-- Undotree
keymap('n', 'U', vim.cmd.UndotreeToggle, { desc = "[U]ndotree toggle", silent = true, noremap = true })
-- [[ Some standard behaviour changes ]]
-- Y is mapped to y$, remap to yg_
keymap('n', 'Y', 'yg_', { noremap = true, silent = true, desc = '[Y]ank the line' })
-- {>,<} preserve the selection
keymap('v', '>', '>gv', { noremap = true, silent = true })
keymap('v', '<', '<gv', { noremap = true, silent = true })
-- Undotree
keymap('n', 'U', vim.cmd.UndotreeToggle, { desc = "[U]ndotree toggle", silent = true, noremap = true })