remap.lua 928 B

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