Neovim configs for 2023. Hopefully they last.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. local map = vim.api.nvim_set_keymap
  2. local opts = { noremap = true, silent = true }
  3. -- Move to previous/next
  4. map('n', '', '<Cmd>BufferPrevious<CR>', opts)
  5. map('n', '', '<Cmd>BufferNext<CR>', opts)
  6. -- Re-order to previous/next
  7. map('n', '¯', '<Cmd>BufferMovePrevious<CR>', opts)
  8. map('n', '˘', '<Cmd>BufferMoveNext<CR>', opts)
  9. -- Goto buffer in position...
  10. map('n', '¡', '<Cmd>BufferGoto 1<CR>', opts)
  11. map('n', '', '<Cmd>BufferGoto 2<CR>', opts)
  12. map('n', '£', '<Cmd>BufferGoto 3<CR>', opts)
  13. map('n', '¢', '<Cmd>BufferGoto 4<CR>', opts)
  14. map('n', '', '<Cmd>BufferGoto 5<CR>', opts)
  15. map('n', '§', '<Cmd>BufferGoto 6<CR>', opts)
  16. map('n', '', '<Cmd>BufferGoto 7<CR>', opts)
  17. map('n', '', '<Cmd>BufferGoto 8<CR>', opts)
  18. map('n', 'ª', '<Cmd>BufferGoto 9<CR>', opts)
  19. map('n', 'º', '<Cmd>BufferLast<CR>', opts)
  20. -- Pin/unpin buffer
  21. map('n', 'π', '<Cmd>BufferPin<CR>', opts)
  22. -- Close buffer
  23. map('n', 'ç', '<Cmd>BufferClose<CR>', opts)
  24. ---- Move to previous/next
  25. --map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
  26. --map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
  27. ---- Re-order to previous/next
  28. --map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
  29. --map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
  30. ---- Goto buffer in position...
  31. --map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
  32. --map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
  33. --map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
  34. --map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
  35. --map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
  36. --map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
  37. --map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
  38. --map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
  39. --map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
  40. --map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
  41. ---- Pin/unpin buffer
  42. --map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
  43. ---- Close buffer
  44. --map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
  45. -- Wipeout buffer
  46. -- :BufferWipeout
  47. -- Close commands
  48. -- :BufferCloseAllButCurrent
  49. -- :BufferCloseAllButPinned
  50. -- :BufferCloseAllButCurrentOrPinned
  51. -- :BufferCloseBuffersLeft
  52. -- :BufferCloseBuffersRight
  53. -- Magic buffer-picking mode
  54. map('n', '<C-P>', '<Cmd>BufferPick<CR>', opts)
  55. -- Sort automatically by...
  56. map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
  57. map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
  58. map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
  59. map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)