comment keymaps
This commit is contained in:
parent
9d6eb23ea3
commit
8a8991263b
|
@ -1,30 +1,39 @@
|
|||
{...}: {
|
||||
plugins.comment = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
# LHS of toggle mappings in NORMAL mode
|
||||
toggler = {
|
||||
# Line-comment toggle keymap
|
||||
line = "<leader>c<space>";
|
||||
# Block-comment toggle keymap
|
||||
block = "<leader>c<enter>";
|
||||
line = "<leader>cl<Return>";
|
||||
block = "<leader>cb<Return>";
|
||||
};
|
||||
# LHS of operator-pending mappings in NORMAL and VISUAL mode
|
||||
|
||||
opleader = {
|
||||
# Line-comment keymap
|
||||
line = "<leader>c<space>";
|
||||
# Block-comment keymap
|
||||
block = "<leader>c<enter>";
|
||||
line = "<leader>cl";
|
||||
block = "<leader>cb";
|
||||
};
|
||||
# LHS of extra mappings
|
||||
|
||||
extra = {
|
||||
# Add comment on the line above
|
||||
above = "<leader>co";
|
||||
# Add comment on the line below
|
||||
below = "<leader>ce";
|
||||
# Add comment at the end of line
|
||||
eol = "<leader>ca";
|
||||
above = "<leader>c<Up>";
|
||||
below = "<leader>c<Down>";
|
||||
eol = "<leader>c<End>";
|
||||
};
|
||||
|
||||
mappings = {
|
||||
basic = true;
|
||||
extra = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{ # prefix: comment
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>c";
|
||||
action = "<Nop>";
|
||||
options = {
|
||||
desc = "+comment";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -17,15 +17,6 @@
|
|||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>c";
|
||||
action = "<Nop>";
|
||||
options = {
|
||||
desc = "+comment";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>g";
|
||||
|
|
Loading…
Reference in a new issue