feat(keymaps): add comment above/below current line with gco/gcO

This commit is contained in:
Folke Lemaitre 2024-05-28 07:39:26 +02:00
parent e68ff6897e
commit 47a8736278
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -75,6 +75,10 @@ map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
map("v", "<", "<gv")
map("v", ">", ">gv")
-- commenting
map("n", "gco", "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Below" })
map("n", "gcO", "O<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Above" })
-- lazy
map("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Lazy" })