|
@ -1,6 +1,10 @@ |
|
|
-- Don't copy "c" changes to primary register |
|
|
-- Don't copy "c" changes to primary register |
|
|
vim.keymap.set("n", "c", '"_c', { desc = "Prevent copying to primary register" }) |
|
|
vim.keymap.set("n", "c", '"_c', { desc = "Prevent copying to primary register" }) |
|
|
|
|
|
|
|
|
|
|
|
-- Move lines up and down |
|
|
|
|
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv") |
|
|
|
|
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv") |
|
|
|
|
|
|
|
|
-- Easily open splits |
|
|
-- Easily open splits |
|
|
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" }) |
|
@ -25,20 +29,6 @@ vim.keymap.set("n", "<F7>", function() |
|
|
vim.cmd("source ~/.cache/nvim/session/shutdown_session.vim") |
|
|
vim.cmd("source ~/.cache/nvim/session/shutdown_session.vim") |
|
|
end, { desc = "Restore session automatically created on VimLeave" }) |
|
|
end, { desc = "Restore session automatically created on VimLeave" }) |
|
|
|
|
|
|
|
|
-- Navigating with guides |
|
|
|
|
|
-- vim.keymap.set( |
|
|
|
|
|
-- "n", |
|
|
|
|
|
-- "<leader><leader>", |
|
|
|
|
|
-- '<Esc>/<++><Enter>"_c4l', |
|
|
|
|
|
-- { desc = "Find next <++> in file and enter insert mode" } |
|
|
|
|
|
-- ) |
|
|
|
|
|
-- vim.keymap.set( |
|
|
|
|
|
-- "v", |
|
|
|
|
|
-- "<leader><leader>", |
|
|
|
|
|
-- '<Esc>/<++><Enter>"_c4l', |
|
|
|
|
|
-- { desc = "Find next <++> in file and enter insert mode" } |
|
|
|
|
|
-- ) |
|
|
|
|
|
|
|
|
|
|
|
-- 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", "<cmd>setlocal spell! spelllang=en_au<CR>", { desc = "Toggle spell check" }) |
|
|
|
|
|
|
|
@ -60,14 +50,6 @@ 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-8>", "8gt", { desc = "Navigate to tab 9" }) |
|
|
vim.keymap.set("n", "<A-9>", "9gt", { desc = "Navigate to tab 10" }) |
|
|
vim.keymap.set("n", "<A-9>", "9gt", { desc = "Navigate to tab 10" }) |
|
|
|
|
|
|
|
|
-- TODO: Move these into fugitive config |
|
|
|
|
|
-- vim.keymap.set('n', '<leader>gp', '<cmd>Git push<CR>', options) |
|
|
|
|
|
-- vim.keymap.set('n', '<leader>gP', '<cmd>Git pull<CR>', options) |
|
|
|
|
|
-- vim.keymap.set('n', '<leader>ga', '<cmd>Git add .<CR>', options) |
|
|
|
|
|
-- vim.keymap.set('n', '<leader>gA', '<cmd>Git add<CR>', options) |
|
|
|
|
|
-- vim.keymap.set('n', '<leader>gc', '<cmd>Git commit<CR>', options) |
|
|
|
|
|
-- vim.keymap.set('n', '<leader>gC', '<cmd>Git commit -a<CR>', options) |
|
|
|
|
|
|
|
|
|
|
|
vim.keymap.set("x", "<leader>p", '"_dP', { desc = "Delete into black hole register" }) |
|
|
vim.keymap.set("x", "<leader>p", '"_dP', { desc = "Delete into black hole register" }) |
|
|
vim.keymap.set("n", "<leader>d", '"_d', { desc = "Delete into black hole register" }) |
|
|
vim.keymap.set("n", "<leader>d", '"_d', { desc = "Delete into black hole register" }) |
|
|
vim.keymap.set("v", "<leader>d", '"_d', { desc = "Delete into black hole register" }) |
|
|
vim.keymap.set("v", "<leader>d", '"_d', { desc = "Delete into black hole register" }) |
|
|