actually i kinda liked this
This commit is contained in:
parent
8a8991263b
commit
b5b7fdebc6
|
@ -11,6 +11,7 @@
|
|||
./plugins/cmp/cmp.nix
|
||||
|
||||
# Editor plugins and configurations
|
||||
./plugins/editor/buffers.nix
|
||||
./plugins/editor/comment.nix
|
||||
./plugins/editor/treesitter.nix
|
||||
|
||||
|
|
|
@ -46,42 +46,5 @@
|
|||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{ # buffer prefix
|
||||
mode = "n";
|
||||
key = "<leader>b";
|
||||
action = "<Nop>";
|
||||
options = {
|
||||
desc = "+buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{ # goto next buffer
|
||||
mode = ["n"];
|
||||
key = "<leader>bn";
|
||||
action = ":bnext<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{ # goto previous buffer
|
||||
mode = ["n"];
|
||||
key = "<leader>bp";
|
||||
action = ":bprevious<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{ # delete buffer
|
||||
mode = ["n"];
|
||||
key = "<leader>bd";
|
||||
action = ":b#<bar>bd#<cr>";
|
||||
options = {
|
||||
desc = ":bdelete";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
59
config/plugins/editor/buffers.nix
Normal file
59
config/plugins/editor/buffers.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{...}: {
|
||||
plugins.bufdelete = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
# buffer prefix
|
||||
mode = "n";
|
||||
key = "<leader>b";
|
||||
action = "<Nop>";
|
||||
options = {
|
||||
desc = "+buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
# goto next buffer
|
||||
mode = ["n"];
|
||||
key = "<leader>bn";
|
||||
action = ":bnext<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
# goto previous buffer
|
||||
mode = ["n"];
|
||||
key = "<leader>bp";
|
||||
action = ":bprevious<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
# delete buffer
|
||||
mode = ["n"];
|
||||
key = "<leader>bd";
|
||||
action = ":Bdelete<cr>";
|
||||
options = {
|
||||
desc = "bdelete";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
# wipeout buffer
|
||||
mode = ["n"];
|
||||
key = "<leader>bw";
|
||||
action = ":Bwipeout<cr>";
|
||||
options = {
|
||||
desc = "bwipeout";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue