keymap.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. vim.keymap.set('n', 'Q', ':EvalPython<CR>')
  2. -- show the vim builtin Explorer
  3. vim.keymap.set('n', '<leader>pv', vim.cmd.Ex, { desc = 'Open Builtin File Explorer' })
  4. -- move whole blocks back and forth
  5. vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
  6. vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
  7. -- Keep the search results in the middle
  8. vim.keymap.set('n', 'n', 'nzzzv')
  9. vim.keymap.set('n', 'N', 'Nzzzv')
  10. -- Copy/Pasting with System Clipboard
  11. vim.keymap.set('n', '<leader>y', '"+y')
  12. vim.keymap.set('v', '<leader>y', '"+y')
  13. vim.keymap.set('n', '<leader>Y', '"+Y')
  14. -- scrolling with C-e, C-y, scroll 5 lines at once
  15. vim.keymap.set('n', '<C-e>', '5<C-e>')
  16. vim.keymap.set('n', '<C-y>', '5<C-y>')
  17. -- When selecting Text, keep the Block selected
  18. vim.keymap.set('v', '<', '<gv')
  19. vim.keymap.set('v', '>', '>gv')
  20. -- Buffer next/prev
  21. vim.keymap.set('n', '<leader>a', ':bp!<CR>', { desc = 'Jump to previous buffer' })
  22. vim.keymap.set('n', '<leader>s', ':bn!<CR>', { desc = 'Jump to next buffer' })
  23. -- Telescope Buffer
  24. vim.keymap.set('n', '<leader>b', ':Telescope buffers<CR>', { desc = 'Open the Telescope Buffers Window' })