Advertisement
Wurfkreuz

Untitled

May 4th, 2023 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. -- Mapping data with "desc" stored directly by vim.keymap.set().
  2. --
  3. -- Please use this mappings table to set keyboard mapping since this is the
  4. -- lower level configuration and more robust one. (which-key will
  5. -- automatically pick-up stored data by this setting.)
  6. return {
  7. -- first key is the mode
  8. n = {
  9. -- second key is the lefthand side of the map
  10. -- mappings seen under group name "Buffer"
  11. ["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
  12. ["<leader>bD"] = {
  13. function()
  14. require("astronvim.utils.status").heirline.buffer_picker(function(bufnr) require("astronvim.utils.buffer").close(bufnr) end)
  15. end,
  16. desc = "Pick to close",
  17. },
  18. -- tables with the `name` key will be registered with which-key if it's installed
  19. -- this is useful for naming menus
  20. ["<leader>b"] = { name = "Buffers" },
  21. -- quick save
  22. -- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
  23. ["<leader>nt"] = {":tabnext<CR>", "Switch to the next tab"},
  24. ["<leader>pt"] = {":tabprevious<CR>", "Switch to the previous tab"},
  25. },
  26. t = {
  27. -- setting a mapping to false will disable it
  28. -- ["<esc>"] = false,
  29. },
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement