feat(nvim): add keymap to delete all buffers except the viewed buffer

This commit is contained in:
Stefan Imhoff
2023-06-24 09:58:37 +02:00
parent de8ac613d7
commit ccdf2208f4
2 changed files with 2 additions and 1 deletions

View File

@@ -1 +1 @@
{"language":"en","version":"0.2","dictionaries":["words"],"ignorePaths":["nvim\/dictionary","nvim\/spell","nvim\/thesaurus","private"],"words":["Cheatsheet","Fira","Groeger","Imhoff","MANPATH","Neovim","Zelos","astro","autotag","baleia","catppuccin","chafa","chriskempson","difftool","dotfiles","folke","goolord","miniconda","noautocmd","noice","nvim","oldfiles","pnpx","princejoogie","softwareupdate","startinsert","texbin","tmuxinator","tpope","wezterm","whatchanged","windwp","wuelnerdotexe","zoxide","hrsh","tailwindcss","roobert","zbirenbaum","Kunz","lazyvim","guifg","guibg","devicons","lualine","linrongbin","globalstatus","stylua","navic","tabline","Autocmds","autocmd","afile","yabairc","skhd","skhdrc","yabai","nolist","gitmux","linebreak","wincmd","tabdo","augroup"]}
{"words":["Cheatsheet","Fira","Groeger","Imhoff","MANPATH","Neovim","Zelos","astro","autotag","baleia","catppuccin","chafa","chriskempson","difftool","dotfiles","folke","goolord","miniconda","noautocmd","noice","nvim","oldfiles","pnpx","princejoogie","softwareupdate","startinsert","texbin","tmuxinator","tpope","wezterm","whatchanged","windwp","wuelnerdotexe","zoxide","hrsh","tailwindcss","roobert","zbirenbaum","Kunz","lazyvim","guifg","guibg","devicons","lualine","linrongbin","globalstatus","stylua","navic","tabline","Autocmds","autocmd","afile","yabairc","skhd","skhdrc","yabai","nolist","gitmux","linebreak","wincmd","tabdo","augroup","keymap","keymaps","noremap","bdelete","bufdo","Nzzzv"],"language":"en","dictionaries":["words"],"ignorePaths":["nvim\/dictionary","nvim\/spell","nvim\/thesaurus","private"],"version":"0.2"}

View File

@@ -9,6 +9,7 @@ vim.keymap.set("v", "y", "myy`y", { desc = "Maintain the cursor position when ya
vim.keymap.set("n", "+", "<C-a>", { desc = "Increment", noremap = true, silent = true })
vim.keymap.set("n", "-", "<C-x>", { desc = "Decrement", noremap = true, silent = true })
vim.keymap.set("n", "<leader>bx", ":bufdo bdelete<CR>", { desc = "Delete all buffers", noremap = true, silent = true })
vim.keymap.set("n", "<leader>bsd", "<cmd>%bd|e#|bd#<cr>|'<cr>", { desc = "Delete surrounding buffers" })
vim.keymap.set("n", "<leader>ut", ":set list!<CR>", { desc = "Toggle list", noremap = true, silent = true })
vim.keymap.set("n", "Y", "yg$", { desc = "Copy to the end of the line", noremap = true, silent = true })
-- stylua: ignore