[nvim] feat: Comment plugin keymaps

This commit is contained in:
David JULIEN 2021-10-17 14:41:33 +02:00
parent 6bd3c20f7d
commit 1634cc1679

View File

@ -20,27 +20,30 @@ require("Comment").setup {
---operator-pending mapping ---operator-pending mapping
---Includes `gcc`, `gcb`, `gc[count]{motion}` and `gb[count]{motion}` ---Includes `gcc`, `gcb`, `gc[count]{motion}` and `gb[count]{motion}`
basic = true, basic = true,
---extra mapping
---Includes `gco`, `gcO`, `gcA`
extra = true,
---extended mapping ---extended mapping
---Includes `g>`, `g<`, `g>[count]{motion}` and `g<[count]{motion}` ---Includes `g>`, `g<`, `g>[count]{motion}` and `g<[count]{motion}`
extra = false, extended = false,
}, },
---LHS of line and block comment toggle mapping in NORMAL/VISUAL mode ---LHS of line and block comment toggle mapping in NORMAL/VISUAL mode
---@type table ---@type table
toggler = { toggler = {
---line-comment toggle ---line-comment toggle
line = 'gcc', line = "<leader><Space>",
---block-comment toggle ---block-comment toggle
block = 'gbc', block = "<leader>bb",
}, },
---LHS of line and block comment operator-mode mapping in NORMAL/VISUAL mode ---LHS of line and block comment operator-mode mapping in NORMAL/VISUAL mode
---@type table ---@type table
opleader = { opleader = {
---line-comment opfunc mapping ---line-comment opfunc mapping
line = 'gc', line = "<leader>c",
---block-comment opfunc mapping ---block-comment opfunc mapping
block = 'gb', block = "<leader>b",
}, },
---Pre-hook, called before commenting the line ---Pre-hook, called before commenting the line