1234567891011121314151617181920212223242526272829 |
- -- map leader to <space>
- vim.g.mapleader = " "
- -- show the vim builtin Explorer
- vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
- -- move whole blocks back and forth
- vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
- vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
- -- Keep the search results in the middle
- vim.keymap.set("n", "n", "nzzzv")
- vim.keymap.set("n", "N", "Nzzzv")
- -- Copy/Pasting with System Clipboard
- vim.keymap.set("n", "<leader>y", "\"+y")
- vim.keymap.set("v", "<leader>y", "\"+y")
- vim.keymap.set("n", "<leader>Y", "\"+Y")
- -- scrolling with C-e, C-y, scroll 5 lines at once
- vim.keymap.set("n", "<C-e>", "5<C-e>")
- vim.keymap.set("n","<C-y>", "5<C-y>")
- -- When selecting Text, keep the Block selected
- vim.keymap.set("v", "<", "<gv")
- vim.keymap.set("v", ">", ">gv")
|