feat(nvim): add new keymaps for moving to the next and previous comment block

This commit is contained in:
Sergio Laín 2024-02-03 13:03:47 +01:00
parent 8bc3f842d1
commit e939bb0e08
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
2 changed files with 5 additions and 1 deletions

View file

@ -80,6 +80,10 @@ map("n", "<leader>u<tab>", function()
end
end, { desc = "Toggle Tabline" })
-- Comment box
map("n", "]/", "/\\S\\zs\\s*╭<CR>zt", { desc = "Next block comment" })
map("n", "[/", "?\\S\\zs\\s*╭<CR>zt", { desc = "Prev block comment" })
-- Plugin Info
map("n", "<leader>cif", "<cmd>LazyFormatInfo<cr>", { desc = "Formatting" })
map("n", "<leader>cic", "<cmd>ConformInfo<cr>", { desc = "Conform" })

View file

@ -32,7 +32,7 @@ return {
-- Start/end of line:
map({ "n", "x" }, "0", "<Cmd>lua Scroll('0')<CR>")
map({ "n", "x" }, "^", "<Cmd>lua Scroll('^')<CR>")
map({ "n", "x" }, "_", "<Cmd>lua Scroll('_')<CR>")
map({ "n", "x" }, "$", "<Cmd>lua Scroll('$', 0, 1)<CR>")
-- Paragraph movements: