|
@ -9,11 +9,8 @@ vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv") |
|
|
vim.keymap.set("n", "<leader>hs", "<cmd>split<cr>", { desc = "Open horizontal spilt" }) |
|
|
vim.keymap.set("n", "<leader>hs", "<cmd>split<cr>", { desc = "Open horizontal spilt" }) |
|
|
vim.keymap.set("n", "<leader>vs", "<cmd>vsplit<cr>", { desc = "Open vertical spilt" }) |
|
|
vim.keymap.set("n", "<leader>vs", "<cmd>vsplit<cr>", { desc = "Open vertical spilt" }) |
|
|
|
|
|
|
|
|
-- Copy the entire file |
|
|
|
|
|
vim.keymap.set("n", "<leader>y", "ggyG<C-o>", { desc = "Copy the entire file to default register" }) |
|
|
|
|
|
|
|
|
|
|
|
-- Spell-check |
|
|
-- Spell-check |
|
|
vim.keymap.set("n", "<leader>o", "<cmd>setlocal spell! spelllang=en_au<CR>", { desc = "Toggle spell check" }) |
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<leader>o", vim.cmd("setlocal spell! spelllang=en_au"), { desc = "Toggle spell check" }) |
|
|
|
|
|
|
|
|
-- Map Q to nop |
|
|
-- Map Q to nop |
|
|
vim.keymap.set("n", "Q", "<nop>", { desc = "Remap Q to <nop> because Q is the worst" }) |
|
|
vim.keymap.set("n", "Q", "<nop>", { desc = "Remap Q to <nop> because Q is the worst" }) |
|
@ -22,17 +19,6 @@ vim.keymap.set("n", "Q", "<nop>", { desc = "Remap Q to <nop> because Q is the wo |
|
|
vim.keymap.set("v", "<", "<gv", { desc = "Keep highlight when indenting" }) |
|
|
vim.keymap.set("v", "<", "<gv", { desc = "Keep highlight when indenting" }) |
|
|
vim.keymap.set("v", ">", ">gv", { desc = "Keep highlight when indenting" }) |
|
|
vim.keymap.set("v", ">", ">gv", { desc = "Keep highlight when indenting" }) |
|
|
|
|
|
|
|
|
-- Easily navigate tabs |
|
|
|
|
|
-- vim.keymap.set("n", "<A-1>", "1gt", { desc = "Navigate to tab 2" }) |
|
|
|
|
|
-- vim.keymap.set("n", "<A-2>", "2gt", { desc = "Navigate to tab 3" }) |
|
|
|
|
|
-- vim.keymap.set("n", "<A-3>", "3gt", { desc = "Navigate to tab 4" }) |
|
|
|
|
|
-- vim.keymap.set("n", "<A-4>", "4gt", { desc = "Navigate to tab 5" }) |
|
|
|
|
|
-- vim.keymap.set("n", "<A-5>", "5gt", { desc = "Navigate to tab 6" }) |
|
|
|
|
|
-- vim.keymap.set("n", "<A-6>", "6gt", { desc = "Navigate to tab 7" }) |
|
|
|
|
|
-- vim.keymap.set("n", "<A-7>", "7gt", { desc = "Navigate to tab 8" }) |
|
|
|
|
|
-- vim.keymap.set("n", "<A-8>", "8gt", { desc = "Navigate to tab 9" }) |
|
|
|
|
|
-- vim.keymap.set("n", "<A-9>", "9gt", { desc = "Navigate to tab 10" }) |
|
|
|
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<leader>tN", "<cmd>tabnew<CR>", { desc = "New tab" }) |
|
|
vim.keymap.set("n", "<leader>tN", "<cmd>tabnew<CR>", { desc = "New tab" }) |
|
|
vim.keymap.set("n", "<leader>tn", "<cmd>tabnext<CR>", { desc = "Next tab" }) |
|
|
vim.keymap.set("n", "<leader>tn", "<cmd>tabnext<CR>", { desc = "Next tab" }) |
|
|
vim.keymap.set("n", "<leader>tp", "<cmd>tabprevious<CR>", { desc = "Previous tab" }) |
|
|
vim.keymap.set("n", "<leader>tp", "<cmd>tabprevious<CR>", { desc = "Previous tab" }) |
|
@ -57,8 +43,8 @@ vim.keymap.set("n", "<leader>j", "<cmd>cnext<CR>zz", { desc = "Next item in quic |
|
|
vim.keymap.set( |
|
|
vim.keymap.set( |
|
|
"n", |
|
|
"n", |
|
|
"<leader>rr", |
|
|
"<leader>rr", |
|
|
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], |
|
|
|
|
|
|
|
|
[[:%s/\<<C-r><C-w>\>//gI<Left><Left><Left>]], |
|
|
{ desc = "Search and replace for word under cursor" } |
|
|
{ desc = "Search and replace for word under cursor" } |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
vim.keymap.set('t', '<C-space>', "<C-\\><C-n>",{silent = true}) |
|
|
|
|
|
|
|
|
vim.keymap.set('t', '<C-space>', "<C-\\><C-n>", { silent = true }) |