diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-22 00:08:36 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-22 00:08:36 +0200 |
commit | b51f1ae28924a752258e7607fbc3210f9b18eaac (patch) | |
tree | 8c8c095528990b3f6eb499dbcca15e9720e636d1 /.config/nvim/lua/core/bufferline.lua | |
parent | da936b0ed9ac4c171d3c7908e41af1875a82b08b (diff) |
Updates based on Chris's lunarvim
Diffstat (limited to '.config/nvim/lua/core/bufferline.lua')
-rw-r--r-- | .config/nvim/lua/core/bufferline.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.config/nvim/lua/core/bufferline.lua b/.config/nvim/lua/core/bufferline.lua new file mode 100644 index 0000000..d4e4b4f --- /dev/null +++ b/.config/nvim/lua/core/bufferline.lua @@ -0,0 +1,28 @@ +vim.api.nvim_set_keymap("n", "<S-x>", ":BufferClose<CR>", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "<S-l>", ":BufferNext<CR>", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "<S-h>", ":BufferPrevious<CR>", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", { noremap = true, silent = true }) + +O.plugin.which_key.mappings["b"] = { + name = "Buffers", + j = { "<cmd>BufferPick<cr>", "jump to buffer" }, + f = { "<cmd>Telescope buffers<cr>", "Find buffer" }, + w = { "<cmd>BufferWipeout<cr>", "wipeout buffer" }, + e = { + "<cmd>BufferCloseAllButCurrent<cr>", + "close all but current buffer", + }, + h = { "<cmd>BufferCloseBuffersLeft<cr>", "close all buffers to the left" }, + l = { + "<cmd>BufferCloseBuffersRight<cr>", + "close all BufferLines to the right", + }, + D = { + "<cmd>BufferOrderByDirectory<cr>", + "sort BufferLines automatically by directory", + }, + L = { + "<cmd>BufferOrderByLanguage<cr>", + "sort BufferLines automatically by language", + }, +} |