Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

39 lines
1.4 KiB

  1. local map = vim.api.nvim_set_keymap
  2. local opts = { noremap = true, silent = true }
  3. -- Move to previous/next
  4. map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
  5. map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
  6. -- Re-order to previous/next
  7. map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
  8. map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
  9. -- Goto buffer in position...
  10. map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
  11. map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
  12. map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
  13. map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
  14. map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
  15. map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
  16. map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
  17. map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
  18. map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
  19. map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
  20. -- Pin/unpin buffer
  21. map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
  22. -- Pin/unpin buffer
  23. map('n', '<A-Tab>', '<Cmd>b#<CR>', opts)
  24. -- Close buffer
  25. map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
  26. -- Magic buffer-picking mode
  27. map('n', '<C-b>', '<Cmd>BufferPick<CR>', opts)
  28. -- Sort automatically by...
  29. map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
  30. map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
  31. map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
  32. map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)