diff --git a/config/default.nix b/config/default.nix index 17a48df..78f0bd9 100644 --- a/config/default.nix +++ b/config/default.nix @@ -11,7 +11,6 @@ ./plugins/cmp/cmp.nix # Editor plugins and configurations - ./plugins/editor/bufdelete.nix ./plugins/editor/comment.nix ./plugins/editor/treesitter.nix diff --git a/config/keymaps.nix b/config/keymaps.nix index b7fcfe7..4a456a5 100644 --- a/config/keymaps.nix +++ b/config/keymaps.nix @@ -10,5 +10,41 @@ silent = true; }; } + + { # buffer prefix + mode = "n"; + key = "b"; + action = ""; + options = { + desc = "+buffer"; + }; + } + + { # goto next buffer + mode = ["n"]; + key = "bn"; + action = ":bnext"; + options = { + silent = true; + }; + } + + { # goto previous buffer + mode = ["n"]; + key = "bp"; + action = ":bprevious"; + options = { + silent = true; + }; + } + + { # delete buffer + mode = ["n"]; + key = "bd"; + action = ":bdelete"; + options = { + silent = true; + }; + } ]; } diff --git a/config/plugins/editor/bufdelete.nix b/config/plugins/editor/bufdelete.nix deleted file mode 100644 index 33b328a..0000000 --- a/config/plugins/editor/bufdelete.nix +++ /dev/null @@ -1,20 +0,0 @@ -{...}: { - plugins.bufdelete = { - enable = true; - }; - - keymaps = [ - { - mode = "n"; - key = "bd"; - action = "Bdelete"; - options.desc = "Buffer Delete"; - } - { - mode = "n"; - key = "bw"; - action = "Bwipeout"; - options.desc = "Buffer Wipeout"; - } - ]; -} diff --git a/config/plugins/utils/whichkey.nix b/config/plugins/utils/whichkey.nix index f226fd1..d88365d 100644 --- a/config/plugins/utils/whichkey.nix +++ b/config/plugins/utils/whichkey.nix @@ -14,15 +14,6 @@ }; } - { - mode = "n"; - key = "b"; - action = ""; - options = { - desc = "+buffer"; - }; - } - { mode = ["n" "v"]; key = "c";